From: Sam S. <sd...@gn...> - 2003-07-31 23:47:43
|
1. why can't I pass NIL as a C-POINTER and have CLISP use NULL?! 2. <http://norsys.com/netica_c_api.htm> (def-c-type environ_ns_ c-pointer) (def-call-out new-netica-environ_ns (:arguments (license c-string) (env c-string) (locn c-string)) (:return-type environ_ns_) (:name "NewNeticaEnviron_ns")) (def-call-out init-netica_bn (:arguments (envp (c-ptr environ_ns_) :in-out) (mesg (c-ptr c-string) :out)) (:return-type int) (:name "InitNetica_bn")) for typedef struct environ__ns environ_ns; environ_ns* NewNeticaEnviron_ns (const char* license, environ_ns* env, const char* locn); int InitNetica_bn (environ_ns** envp, char* mesg); results in: [1]> (setq netica-env (netica:new-netica-environ_ns "foo" nil nil)) #<FOREIGN-ADDRESS #x100C7A70> [2]> (multiple-value-setq (status netica-env message) (netica:init-netica_bn netica-env)) Program received signal SIGSEGV, Segmentation fault. 0x0054aa24 in C_foreign_call_out (argcount=1, rest_args_pointer=0x14600d8) at fo reign.d:3294 3294 *resptr = convert_from_foreign(*resptr,results[i].address); (gdb) p results $1 = (result_descr (*)[0]) 0x6c206568 (gdb) p results[0] Cannot perform pointer math on incomplete types, try casting to a known type, or void *. (gdb) p results[i].address Cannot perform pointer math on incomplete types, try casting to a known type, or void *. (gdb) -- Sam Steingold (http://www.podval.org/~sds) running w2k <http://www.camera.org> <http://www.iris.org.il> <http://www.memri.org/> <http://www.mideasttruth.com/> <http://www.palestine-central.com/links.html> Growing Old is Inevitable; Growing Up is Optional. |