From: Eric de G. <er...@er...> - 2001-06-07 20:00:50
|
Sam- Ok thanks, that last patch worked. I can do everything without having to manually edit any files. Excellent. Do you have any ideas about my other questions? If I define all the c structs in lisp and use them as the types in my def-c-call-outs rather than just using c-pointer, I cannot do the following: (let ((conn (MYSQL::mysql_init nil))) (MYSQL::mysql_connect conn "localhost" "root" "") (MYSQL::mysql_get_server_info conn)) NIL I have to do: (let ((conn (MYSQL::mysql_init nil))) (let ((conn (MYSQL::mysql_connect conn "localhost" "root" ""))) (MYSQL::mysql_get_server_info conn))) "3.22.32-log" Here are the def-c-callouts using the structs used in the first example: (def-c-call-out mysql_init (:arguments (mysql (c-ptr-null st_mysql))) (:return-type (c-ptr-null st_mysql))) (def-c-call-out mysql_get_server_info (:arguments (mysql (c-ptr-null st_mysql))) (:return-type c-string)) (def-c-call-out mysql_connect (:arguments (mysql (c-ptr-null st_mysql)) (host c-string) (user c-string) (passwd c-string)) (:return-type (c-ptr-null st_mysql))) and heres how I redefined them to use c-pointer, which works, as seen in the above second example: (def-c-call-out mysql_init (:arguments (mysql (c-ptr-null nil))) (:return-type c-pointer)) (def-c-call-out mysql_get_server_info (:arguments (mysql c-pointer)) (:return-type c-string)) (def-c-call-out mysql_connect (:arguments (mysql c-pointer) (host c-string) (user c-string) (passwd c-string)) (:return-type c-pointer)) How can I get the pointers to work in the second example? -Eric de Groot mailto:er...@er... |