[issue1720595] Allow T_BOOL in PyMemberDef definitions

2008-01-21 Thread Georg Brandl
Georg Brandl added the comment: Okay, added tests, removed the cast and committed in r60181. If I find time, I'll add docs for PyMemberDef in the next few days. -- resolution: -> accepted status: open -> closed _ Tracker <[EMAIL PROTECTED]>

[issue1720595] Allow T_BOOL in PyMemberDef definitions

2008-01-21 Thread Martin v. Löwis
Martin v. Löwis added the comment: I can't see anything wrong with the feature. Of course, the patch itself lacks changes to the test suite. Ideally, there would also be changes to the documentation, but as PyMemberDef seems to be undocumented currently, it's unfair to ask for documentation with

[issue1720595] Allow T_BOOL in PyMemberDef definitions

2008-01-21 Thread Georg Brandl
Georg Brandl added the comment: Martin - is a char struct member for T_BOOL fine with you? -- assignee: -> loewis nosy: +loewis _ Tracker <[EMAIL PROTECTED]> _

[issue1720595] Allow T_BOOL in PyMemberDef definitions

2008-01-20 Thread Antoine Pitrou
Antoine Pitrou added the comment: It seems to me that, when a boolean is to be represented, most C programmers would expect a char rather than an int. Also an int would make the object larger without any benefit. As for type checking, Angelo's patch already does a PyBool_Check against the argume

[issue1720595] Allow T_BOOL in PyMemberDef definitions

2008-01-12 Thread Georg Brandl
Georg Brandl added the comment: The question is also what C type to assume for boolean fields -- char or int? _ Tracker <[EMAIL PROTECTED]> _

[issue1720595] Allow T_BOOL in PyMemberDef definitions

2008-01-11 Thread Christian Heimes
Christian Heimes added the comment: allow or reject it for 2.6, Georg? -- nosy: +tiran type: -> rfe versions: +Python 2.6 -Python 2.5 _ Tracker <[EMAIL PROTECTED]> _ __