Changeset 12551 in project


Ignore:
Timestamp:
11/17/08 17:45:30 (11 years ago)
Author:
svnwiki
Message:

Changes applied for AndreKuehne? (83.135.48.169) through svnwiki:

join code boxes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wiki/C interface

    r7273 r12551  
    321321 extern int callout(int, int, int);
    322322 <#
    323 
     323 
    324324 (define callout (foreign-safe-lambda int "callout" int int int))
    325 
     325 
    326326 (define-external (callin (scheme-object xyz)) int
    327327   (print "This is 'callin': " xyz)
    328328   123)
    329 
     329 
    330330 (print (callout 1 2 3))
    331331
     
    333333 #include <stdio.h>
    334334 #include "chicken.h"
    335 
     335 
    336336 extern int callout(int, int, int);
    337337 extern int callin(C_word x);
    338 
     338 
    339339 int callout(int x, int y, int z)
    340340 {
    341341   C_word *ptr = C_alloc(C_SIZEOF_LIST(3));
    342342   C_word lst;
    343 
     343 
    344344   printf("This is 'callout': %d, %d, %d\n", x, y, z);
    345345   lst = C_list(&ptr, 3, C_fix(x), C_fix(y), C_fix(z));
Note: See TracChangeset for help on using the changeset viewer.