Re: Help with callbacks

"smallhairytroll" <[email protected]> Sun, 08 Jun 2003 07:59:12 -0000
Newsgroups gmane.lisp.corman
Message-ID <[email protected]>
--- In [email protected], Chris Double <chris.double@d...> 
wrote:
 
> What happens if you instead try:
> 
> (setf var-1 (ct:malloc (ct:sizeof :LONG)))
> (setf (ct:cref (:long *) var-1 0) 0)
>  (setf a-timer-1 (SDL_AddTimer
>          1000
>          (ct:get-callback-procinst 'my-timer-func-1) var-1))
> 
> From the looks of things SDL_AddTimer expects a pointer to some 
allocated 
> memory that it will in turn pass to your function. Creating a 
pointer to a 
> long as above and just passing that should work. I'm not sure what 
> create-pointer and the like do but I don't think you need to use 
it here.

Hi Chris,

No, still crashes CCL :( 

I know SDL callbacks do work as I managed to filter SDL events which 
requires a callback function. However in this case no data was being 
passed back to the callback function.

I have a feeling that it's the passing of data to the timer callback 
function that is causing the problem.

Typical, 90% of SDL is complete and I'm being driven crazy by a 
single callback.

-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/