From: Sam S. <sd...@gn...> - 2003-08-01 15:34:11
|
In C: #include <foobar.h> /* defines `struct foo' and `struct bar' */ typedef struct foo *foo_; typedef struct bar *bar_; void foo1 (foo_ x) { ... } void bar1 (bar_ y) { ... } int main () { foo_ x; bar_ y; ... } if I do foo1(y) in main(), I will get a compile-time error (or at least a warning) in C. what about CLISP? right now, the only way appears to be (def-c-type foo_ c-pointer) (def-c-type bar_ c-pointer) (def-call-out foo1 (:arguments (x foo_)) (:return-type nil)) (def-call-out bar1 (:arguments (x bar_)) (:return-type nil)) and there will be no run-time type check for foo1 and bar1! i.e., I will get a segfault instead of a type-error when I try to pass a foo_ pointer to bar1. is there anything that could be done here? -- 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> The paperless office will become a reality soon after the paperless toilet. |