Hi,

I've removed all of the generated words that construct/dereference the basic 
c-types.  So, words like <uint>, <void*>, *int are gone and have been replaced. 
 Instead, to pass pointers to c-types to the ffi, you use the ``<ref>'' word, 
and to dereference the return value you use ``deref''.  Examples follow.

! the old way
: get-source-param ( source param -- value )
    0 <uint> dup [ alGetSourcei ] dip *uint ;

! the new way
: get-source-param ( source param -- value )
    0 uint <ref> dup [ alGetSourcei ] dip uint deref ;


f <void*>  --->  f void* <ref>

Eventually, we want to move to using with-out-parameters for most ffi calls,  
but the code isn't ready yet.  

Doug
------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store 
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
Factor-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/factor-talk

Reply via email to