guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Benchmarks of guile-www against HB's Guile module.


From: Neil Jerram
Subject: Re: Benchmarks of guile-www against HB's Guile module.
Date: 12 Feb 2002 22:32:41 +0000
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7

>>>>> "Alejandro" == Alejandro Forero Cuervo <address@hidden> writes:

    Alejandro> By the way, I'd rather have 

    Alejandro>     (hb-register "main" proc)

    Alejandro> than

    Alejandro>     (hb-register hbfile "main" proc)

    Alejandro> (since I can't think of any other value instead of
    Alejandro> hbfile as the first argument in the first call) but I
    Alejandro> can't figure out how to register a procedure in a way
    Alejandro> such that Guile will always pass it a given pointer
    Alejandro> value besides the arguments.  Something kinda like

    Alejandro>     void callback ( void *data, SCM name, SCM proc );

    Alejandro>     gh_new_procedure_data2_0("hb-register", &callback, 
user_data);

    Alejandro> rather than

    Alejandro>     void callback ( SCM data, SCM name, SCM proc );

    Alejandro>     /* assignments to hb_guile_hbfile_smob with the pointer */
    Alejandro>     gh_define("hbfile", hb_guile_hbfile_smob);
    Alejandro>     gh_new_procedure3_0("hb-register", &callback); ,

    Alejandro> which is what I currently do in HB.

    Alejandro> Any suggestions?  :)

I don't completely understand what you're aiming for here.  In the
example that you gave before, PROC doesn't accept any arguments, so
how can HB pass hbfile to it?

Is it anything like the example discussed in the `Callback Closure'
node of the manual?

        Neil




reply via email to

[Prev in Thread] Current Thread [Next in Thread]