fix for extension type attributes with cname
Mark Ellis <[email protected]> Sun, 25 Jan 2009 17:28:32 +0000
| Newsgroups | gmane.comp.python.pyrex |
|---|---|
| Message-ID | <1232904512.6691.4.camel@mark01> |
Hi I've attached a trivial patch that seems to fix a bug involving attributes of an extension type, where the attributes have cnames. The compiler was using the name when determining the offset rather than the cname. Hope this is useful ! Mark _______________________________________________ Pyrex mailing list [email protected] http://lists.copyleft.no/mailman/listinfo/pyrex
ext-attrs.diff
(text/x-patch, 657 B)
diff -Nur Pyrex-0.9.8.5.orig/Pyrex/Compiler/ModuleNode.py Pyrex-0.9.8.5/Pyrex/Compiler/ModuleNode.py
--- Pyrex-0.9.8.5.orig/Pyrex/Compiler/ModuleNode.py 2008-08-27 09:56:16.000000000 +0100
+++ Pyrex-0.9.8.5/Pyrex/Compiler/ModuleNode.py 2009-01-25 17:19:17.000000000 +0000
@@ -1213,7 +1213,7 @@
code.putln('{"%s", %s, %s, %s, 0},' % (
entry.name,
type_code,
- "offsetof(%s, %s)" % (objstruct, entry.name),
+ "offsetof(%s, %s)" % (objstruct, entry.cname),
flags))
code.putln(
"{0, 0, 0, 0, 0}")
signature.asc
(application/pgp-signature, 197 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEABECAAYFAkl8oUAACgkQkQq5eu6iQvBK1ACcDxvJsSIWp9C4rkFhw1NwsB3O TP8AoIcqN6GeIJfyvjEsRTQ+K/iIjEnY =XBQi -----END PGP SIGNATURE-----