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).
pgpIM35QGPfWH.pgp
Description: PGP signature
_______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com