const in function type signature
Dominic Sacré <[email protected]> Thu, 25 Dec 2008 12:09:18 +0100
| Newsgroups | gmane.comp.python.pyrex |
|---|---|
| Message-ID | <[email protected]> |
Hi, I'm using Pyrex to wrap a C library that uses callbacks. Some of the parameters to the callback functions are const, e.g. void(*callback)(int num, const char *msg, const char *where) Pyrex doesn't allow const, so i have to write this as void(*callback)(int num, char *msg, char *where) This works, as long as the function doesn't actually try to modify its arguments, but passing the function pointer to the library produces warnings like: passing argument 2 of ‘lo_server_new’ from incompatible pointer type Is there some way to get rid of these warnings? Basically, just allowing the use of const in the Pyrex source, and literally placing it in the generated C code would suffice... Thanks, Dominic _______________________________________________ Pyrex mailing list [email protected] http://lists.copyleft.no/mailman/listinfo/pyrex