Re: Support for qualifiers
Jelmer Vernooij <[email protected]>
| Newsgroups | gmane.comp.python.pyrex |
|---|---|
| Message-ID | <[email protected]> |
Am Mittwoch, den 19.03.2008, 11:05 +1200 schrieb Greg Ewing: > Jelmer Vernooij wrote: > > Pyrex at the moment doesn't support qualifiers on arguments in C > > function prototypes. This causes an awful lot of warnings when writing > > bindings for libraries that make heavy use of the const keyword. > I haven't found it to cause all that many problems, > because passing a non-const pointer to something > declared as const, which is the most frequent > case, is okay. I can appreciate that some libraries > may be more troublesome than others in this regard, > though. I've got quite a few callbacks I have to pass to C functions. This means casting a pyrex implementation without const to a typedef with const. Another place where it is problematic is for functions that take a "const char **" argument. We make heavy use of const in Samba, but I'm also running into it while wrapping the Subversion libraries. It's not really problematic but it makes it harder to notice warnings that actually matter. > > Are there any plans to support these kinds of qualifiers or perhaps use > > const more in the generated code, where possible? > I've been trying to avoid dealing with const if at all > possible, because it will make the type checking code > considerably more complicated. But I haven't entirely > ruled it out. Ah, ok. I figured it would simply be a matter of tracking whether something is const. Would there be more required than that? Cheers, Jelmer -- Jelmer Vernooij <[email protected]> - http://samba.org/~jelmer/ Jabber: [email protected] _______________________________________________ Pyrex mailing list [email protected] http://lists.copyleft.no/mailman/listinfo/pyrex
signature.asc
(application/pgp-signature, 307 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iQCVAwUAR+kzDgy0JeEGD2blAQIzUgP9GdYdkjDFHwSYSfJI1Qz1ntjsy+s3CVUW TgaLLfqAO+WtdP+dgAQUiVQnNz/2ZAzVFGG3RxzMgFIpmCBJUcGiuag2EBLwNEav XACW0p1Q38u4qDy2qChWU8RpGiNBoZNyRXcjEY+mjoguSso75WnD+gfnLJWchP9O QuspL9bDFr0= =ZWZM -----END PGP SIGNATURE-----