New submission from Martin v. Löwis <mar...@v.loewis.de>:

Currently, memory management for the Py_tp_doc slot in PyType_FromSpec is 
ill-defined. The doc string being passed is stored in the type object as-is, 
but later released with PyObject_Free. To make this consistent, PyType_FromSpec 
should copy the string, so that it's guaranteed that relasing the memory 
matches allocation.

Without this patch, users will have to hold onto the type objects they get from 
PyType_FromSpec "forever".

----------
files: tp_doc.diff
keywords: patch
messages: 128857
nosy: loewis
priority: release blocker
severity: normal
status: open
title: Memory mismanagement with Py_tp_doc
Added file: http://bugs.python.org/file20797/tp_doc.diff

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue11249>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to