Re: Sending function pointers to XS

[email protected] (Kartik Thakore)
Newsgroups perl.sdl.devel
Message-ID <[email protected]>
Ok! I have a better version. This works now but it segfaults because  
it is freeing from the wrong pool.

http:://bit.ly/1eEk9C

Kartik Thakore

On 11-Nov-09, at 9:44 PM, Kartik Thakore <[email protected]>  
wrote:

> HI Blabos
>
> Ok! I tried this here. But I need some review on the code. I don't  
> think I am doing the SDL_Event argument in properly.
>
> http://github.com/kthakore/SDL_perl/commit/633f388bbc161bfc5177fb49e482c8cfb27b60aa
>
> Regards
>  Kartik Thakore
>
> On Wed, Nov 11, 2009 at 8:32 AM, Blabos de Blebe <[email protected]>  
> wrote:
> Hi,
>
> Unfortunately I cannot give you a full answer now (time
> constraints...), but into the book below on page 202, section 6.7,
> there is an brief introduction of how manage callbacks. There are also
> some pitfalls. Good luck!
>
> Later I will try to build a better answer.
>
> http://www.manning.com/jenness/
>
> Blabos
>
> On Tue, Nov 10, 2009 at 8:57 PM, Kartik Thakore
> <[email protected]> wrote:
> > Hi,
> > How does one send sub pointers to XS as function pointer?
> >
> > The funtion I am trying to bind is
> >
> >
> > http://www.libsdl.org/cgi/docwiki.cgi/SDL_SetEventFilter
> >
> > One of the paramater requires a function in the format of
> >
> > int typedef (SDL_EventFilter *)(const SDL_Event * Event)
> >
> >
> > What we would like to do is send something like
> >
> > SDL::Events::set_event_filter( \sub {} );
> >
> >
> > Kartik Thakore
> >
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.