[Python-Dev] Word size inconsistencies in C extension modules (original) (raw)
Luke Mewburn lukem at NetBSD.org
Mon Sep 10 09:11:59 CEST 2007
- Previous message: [Python-Dev] Word size inconsistencies in C extension modules
- Next message: [Python-Dev] Word size inconsistencies in C extension modules
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Mon, Sep 10, 2007 at 07:37:02AM +0200, "Martin v. L?wis" wrote: | In principle, it is possible to deal with these in ParseTuple. | To do so: | a) in configure.in, make a configure-time check to compute the | size of the type, and possibly its signedness. | b) in _cursesmodule.c, make a conditional define of ATTR_T_FMT, | which would be either "i" or "l" (or #error if it's neither | the size of int nor the size of long). Then rely on string | concatenation in using that define.
Are there some good examples in the Python source where this technique has been used already? Or were you proposing a cleaner solution that could be experimented with?
| I have a GCC patch which checks for correctness of ParseTuple | calls (in terms of data size) if you are interested.
Sounds like a useful variation of the standard -Wformat stuff.
This probably wouldn't have helped in the AIX situation I experienced (because the IBM compiler was used in that situation), but it could be useful on other BE LP64 platforms that are more gcc-friendly (e.g, NetBSD/sparc64). -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 186 bytes Desc: not available Url : http://mail.python.org/pipermail/python-dev/attachments/20070910/8af04ed8/attachment.pgp
- Previous message: [Python-Dev] Word size inconsistencies in C extension modules
- Next message: [Python-Dev] Word size inconsistencies in C extension modules
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]