[issue3274] Py_CLEAR(tmp) seg faults

2008-07-13 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: Committed the fix r64927. Thanks. -- nosy: +alexandre.vassalotti resolution: -> fixed status: open -> closed ___ Python tracker <[EMAIL PROTECTED]> ___

[issue3274] Py_CLEAR(tmp) seg faults

2008-07-10 Thread Daniel Stutzbach
Daniel Stutzbach <[EMAIL PROTECTED]> added the comment: Appending _tmp is a good idea, but it won't work when the parameter isn't a simple symbol. For example, there's a line in cPickle.c like this: Py_CLEAR(*p). ___ Python tracker <[EMAIL PROTECTED]>

[issue3274] Py_CLEAR(tmp) seg faults

2008-07-10 Thread Nick Coghlan
Nick Coghlan <[EMAIL PROTECTED]> added the comment: A better option may be to append _tmp to the passed in token: #define Py_CLEAR(op)\ do {\ if (op) { \ PyObject

[issue3274] Py_CLEAR(tmp) seg faults

2008-07-03 Thread Daniel Stutzbach
New submission from Daniel Stutzbach <[EMAIL PROTECTED]>: I'm writing a C extension module and discovered that Py_CLEAR() causes a crash if the programmer happened to name their variable "tmp". The Py_CLEAR() macro internally uses the name "tmp" in a new scope, hiding the callers "tmp", and call