[merge][1.8][#277481] set -DWIN32 when compiling all pyrex extensions

Martin Pool mbp at canonical.com
Wed Oct 8 06:35:50 BST 2008


On Wed, Oct 8, 2008 at 3:59 PM, Andrew Bennetts
<andrew.bennetts at canonical.com> wrote:
> Mutating a default argument is likely to cause bugs.  If nothing else it means
> define_macros will have ('WIN32', None) appended to it several times.  It's
> probably harmless with the current setup.py, but I wouldn't bet on this always
> being the case.

Nice catch.

> Why does add_pyrex_extension even allow callers to adjust define_macros?  We
> don't seem to use that capability with this patch.

I added it for compatibility with things that were already passing it
through kwargs.  However, it's probably only used inside this file,
and we can see all the callers don't do that.  So how about this
instead?

-- 
Martin <http://launchpad.net/~mbp/>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 20081008-277481-dwin32-2.diff
Type: text/x-diff
Size: 5166 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20081008/da65ee22/attachment.bin 


More information about the bazaar mailing list