[gforth] / gforth / libffi.fs  

gforth: gforth/libffi.fs

Diff for /gforth/libffi.fs between version 1.22 and 1.29

version 1.22, Tue Jun 17 20:18:11 2008 UTC version 1.29, Sat Aug 9 21:28:39 2008 UTC
Line 1 
Line 1 
 \ libffi.fs     shared library support package          14aug05py  \ libffi.fs     shared library support package          14aug05py
   
 \ Copyright (C) 1995,1996,1997,1998,2000,2003,2005,2006,2007 Free Software Foundation, Inc.  \ Copyright (C) 1995,1996,1997,1998,2000,2003,2005,2006,2007,2008 Free Software Foundation, Inc.
   
 \ This file is part of Gforth.  \ This file is part of Gforth.
   
Line 21 
Line 21 
 \ note that the API functions have their arguments reversed and other  \ note that the API functions have their arguments reversed and other
 \ deviations.  \ deviations.
   
 require libcc.fs  
   
 c-library libffi  c-library libffi
 s" ffi" add-lib  s" ffi" add-lib
   
 \c #include <ffi.h>  \ The ffi.h of XCode needs the following line, and it should not hurt elsewhere
 \c static Cell *gforth_RP;  \c #define MACOSX
 \c static unsigned char *gforth_LP;  include-ffi.h-string save-c-prefix-line \ #include <ffi.h>
   \c extern Cell *gforth_RP;
   \c extern unsigned char *gforth_LP;
 \c static void **gforth_clist;  \c static void **gforth_clist;
 \c static void *gforth_ritem;  \c static void *gforth_ritem;
 \c typedef void *Label;  \c typedef void *Label;
Line 337 
Line 337 
 ' >dl+ ' >dl-   6 argtype dlong  ' >dl+ ' >dl-   6 argtype dlong
 ' >sf+ ' >sf-   9 argtype sf  ' >sf+ ' >sf-   9 argtype sf
 ' >df+ ' >df- &10 argtype df  ' >df+ ' >df- &10 argtype df
   : ints 0 ?DO int LOOP ;
   
 ' noop   0 rettype (void)  ' noop   0 rettype (void)
 ' is>x   6 rettype (int)  ' is>x   6 rettype (int)
Line 424 
Line 425 
 ' ffi-arg-longlong   8 argtype' llong  ' ffi-arg-longlong   8 argtype' llong
 ' ffi-arg-dlong      6 argtype' dlong  ' ffi-arg-dlong      6 argtype' dlong
 ' ffi-arg-ptr      &12 argtype' ptr  ' ffi-arg-ptr      &12 argtype' ptr
   : ints ( n -- ) 0 ?DO postpone int LOOP ; immediate
   
 ' ffi-ret-void       0 rettype' (void)  ' ffi-ret-void       0 rettype' (void)
 ' ffi-ret-int        6 rettype' (int)  ' ffi-ret-int        6 rettype' (int)


Generate output suitable for use with a patch program
Legend:
Removed from v.1.22  
changed lines
  Added in v.1.29

CVS Admin

Powered by ViewCVS 1.0-dev
(Powered by ViewCVS)

ViewCVS and CVS Help