How to use CHICKEN_apply function? Is there an example?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

How to use CHICKEN_apply function? Is there an example?

Aydar Zarifullin

_______________________________________________
Chicken-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/chicken-users
Reply | Threaded
Open this post in threaded view
|

Re: How to use CHICKEN_apply function? Is there an example?

Kon Lovett-3
none that i know. but the general idea is

C_word args = C_list( … );
C_word proc = C_closure( … ); /* example after <a href="http://wiki.call-cc.org/man/5/C interface#c_closure" class="">http://wiki.call-cc.org/man/5/C%20interface#c_closure */
C_word result;
if (CHICKEN_apply( proc, args, &result )) {
/* do something with result */
} else {
char msg[ 1024 ];
CHICKEN_get_error_message( msg, sizeof msg );
/* do something with error msg */
}

do not want to speak for others but the feeling i get is that CHICKEN is considered a little heavy for embedding. there may not be a lot of experience.

btw, the source might help. CHICKEN_apply, for example, is defined in eval.scm.

On Aug 29, 2019, at 6:21 PM, Aydar Zarifullin <[hidden email]> wrote:

_______________________________________________
Chicken-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/chicken-users


_______________________________________________
Chicken-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/chicken-users