[issue11135] Redundant doc field in TypeSpec

2011-02-16 Thread Egon Smiwa
Egon Smiwa smiwa.e...@googlemail.com added the comment: You bring the tp_doc parameter pointer into the ownership of the new typeobject? and tp_doc is assumed to be created by pyObject_malloc? IMO, if CPython wants to be the owner of the string parameter, then it should make a copy of that

[issue11135] Redundant doc field in TypeSpec

2011-02-16 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: It's the same as the current tp_doc parameter for static type objects, and essentially like any other doc string in the C API. It's owned by the extension module, which must make sure it lives at least as long as the type object.

[issue11135] Redundant doc field in TypeSpec

2011-02-16 Thread Egon Smiwa
Egon Smiwa smiwa.e...@googlemail.com added the comment: Hello, I'm just a app developer which is embedding the python32.dll and I assumed (and wished) python would simply copy my allocated parameter-string into the type object (( spec-name) is copied too). I looked in the source and see this

[issue11135] Redundant doc field in TypeSpec

2011-02-16 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: I see. This is an issue independent of the issue discussed here, though, please open a new issue for that. I agree that either tp_dealloc should not release the string, or should make a copy that it can release. --

[issue11135] Redundant doc field in TypeSpec

2011-02-11 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: Thansk for the review. Committed as r88400. -- resolution: - accepted status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11135

[issue11135] Redundant doc field in TypeSpec

2011-02-07 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Looks good. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11135 ___ ___ Python-bugs-list

[issue11135] Redundant doc field in TypeSpec

2011-02-06 Thread Martin v . Löwis
New submission from Martin v. Löwis mar...@v.loewis.de: There are currently two ways to specify a type doc string in PyType_FromSpec; either through the doc field (which is not actually processed), or through Py_tp_doc (which works correctly). The original concern for adding doc into the