Re: Help with callbacks

"smallhairytroll" <[email protected]> Sun, 08 Jun 2003 08:08:14 -0000
Newsgroups gmane.lisp.corman
Message-ID <[email protected]>
--- In [email protected], Chris Double <chris.double@d...> 
wrote:

> I'm not sure what 
> create-pointer and the like do but I don't think you need to use 
it here.
> 

(setf f-pointer (ct:create-foreign-ptr))
(setf var-1 (ct:malloc (ct:sizeof :LONG)))
(setf (ct:cref (:long *) var-1 0) 1001)
(setf (ct:cpointer-value f-pointer) (ct:cpointer-value var-1))

Basically this sets f-pointer to the address of var-1, allowing:

(ct:cref (:long *) f-pointer 0)
1001

Not sure why I did it this way. Must be spending too long browsing 
through the Corman source.

-Luke


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Get A Free Psychic Reading! Your Online Answer To Life's Important Questions.
http://us.click.yahoo.com/Lj3uPC/Me7FAA/ySSFAA/SyjtlB/TM
---------------------------------------------------------------------~->

To unsubscribe from this group, send an email to:
[email protected]

 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/