[Ecls-list] How to define c function for lisp with X arguments?

Peter Enerccio enerccio at gmail.com
Mon Nov 5 23:31:09 UTC 2012


I have only seen in tutorials how to define it with one or possibly
infinite arguments. I am using this kind of macro:

#define DEFUN( name, argcount, fpointer) do { \
    cl_def_c_function(c_string_to_object(name), \
            (cl_objectfn_fixed)fpointer, \
            argcount); \
    } while (0)

which works fine for functions defined as
cl_object foo(cl_narg narg, ...)

but how can you do the same for functions with lets say one argument?

I tried
cl_object foo(cl_narg narg, cl_object v1, ...)

but then argument v1 is total garbage.


-- 
Bc. Peter Vaňušanik
http://www.bishojo.tk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/ecl-devel/attachments/20121106/22e3b956/attachment.html>


More information about the ecl-devel mailing list