Jim Gallacher
Wed, 10 Aug 2005 19:12:09 -0700
Compilation fails with the following: requestobject.c: In function 'request_tp_dealloc':requestobject.c:1482: warning: implicit declaration of function 'request_tp_clear'
requestobject.c: At top level:requestobject.c:1514: error: static declaration of 'request_tp_clear' follows non-static declaration requestobject.c:1482: error: previous implicit declaration of 'request_tp_clear' was here
requestobject.c: In function 'request_tp_clear': requestobject.c:1528: warning: assignment from incompatible pointer type apxs:Error: Command failed with rc=65536Since gcc 3.3 sails right through, I'm going to assume gcc 4 is stricter. It's easy enough to fix (and I will) by adding a function prototype for request_tp_clear before it is called in request_tp_dealloc(). eg.
static int request_tp_clear(requestobject *self);I've noticed that in general functions are implicitly declared in mod_python. Is there a technical reason for this, or is it "just one of those things"?
Also, since request_tp_clear is only used in requestobject.c, is it correct to put the declaration there or should it go in requestobject.h? Ya, I know, my c-skills suck. :)
Regards, Jim