| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a new Py_TPFLAGS_DISALLOW_INSTANTIATION type flag to disallow
creating type instances: set tp_new to NULL and don't create the
"__new__" key in the type dictionary.
The flag is set automatically on static types if tp_base is NULL or
&PyBaseObject_Type and tp_new is NULL.
Use the flag on the following types:
* _curses.ncurses_version type
* _curses_panel.panel
* _tkinter.Tcl_Obj
* _tkinter.tkapp
* _tkinter.tktimertoken
* _xxsubinterpretersmodule.ChannelID
* sys.flags type
* sys.getwindowsversion() type
* sys.version_info type
Update MyStr example in the C API documentation to use
Py_TPFLAGS_DISALLOW_INSTANTIATION.
Add _PyStructSequence_InitType() function to create a structseq type
with the Py_TPFLAGS_DISALLOW_INSTANTIATION flag set.
type_new() calls _PyType_CheckConsistency() at exit.
|
|
|
|
| |
set_panel_usertpr fails (GH-21933)
|
|
|
|
|
| |
Fix regression introduced in
commit 1baf030a902392fe92d934ed0fb6a385cf7d8869: restore removed code
to prevent creating a _curses_panel.panel instance directly.
|
|
|
|
|
|
|
|
|
| |
No longer use deprecated aliases to functions:
* Replace PyObject_MALLOC() with PyObject_Malloc()
* Replace PyObject_REALLOC() with PyObject_Realloc()
* Replace PyObject_FREE() with PyObject_Free()
* Replace PyObject_Del() with PyObject_Free()
* Replace PyObject_DEL() with PyObject_Free()
|
| |
|
|
|
|
|
|
|
|
|
| |
PyType_FromSpec types (reverts GH-19414) (GH-20264)
Heap types now always visit the type in tp_traverse. See added docs for details.
This reverts commit 0169d3003be3d072751dd14a5c84748ab63a249f.
Automerge-Triggered-By: @encukou
|
|
|
|
|
|
|
|
|
|
|
|
| |
The PyObject_NEW() macro becomes an alias to the PyObject_New()
macro, and the PyObject_NEW_VAR() macro becomes an alias to the
PyObject_NewVar() macro, to hide implementation details. They no
longer access directly the PyTypeObject.tp_basicsize member.
Exclude _PyObject_SIZE() and _PyObject_VAR_SIZE() macros from
the limited C API.
Replace PyObject_NEW() with PyObject_New() and replace
PyObject_NEW_VAR() with PyObject_NewVar().
|
|
|
|
| |
functions (GH-19017)
|
| |
|
|
|
|
|
| |
* Incref heap-allocated types in PyObject_Init
* Add documentation and porting notes to What's New
|
|
|
|
|
| |
* remove non-ascii characters in docstring
* clinic.py emits a warning when docstring has non-ascii character
|
|
|
|
| |
(GH-4251)
|
|
|
|
| |
possible. Patch is writen with Coccinelle.
|
|\ |
|
| | |
|
|\ \
| |/
| |
| | |
_tkinter and curses.panel modules.
|
| |
| |
| |
| | |
_tkinter and curses.panel modules.
|
|\ \
| |/
| |
| | |
in places where Py_DECREF was used.
|
| |
| |
| |
| | |
in places where Py_DECREF was used.
|
|\ \
| |/ |
|
| | |
|
| |
| |
| |
| | |
private functions.
|
|/ |
|
|
|
|
| |
macro Py_SETREF.
|
|
|
|
|
| |
Don't call PyErr_NewException() if an exception is set, or type_call() would
fail with an assertion error.
|
|
|
|
|
| |
Replace malloc() with PyMem_Malloc() when the GIL is held, or with
PyMem_RawMalloc() otherwise.
|
|
|
|
|
|
| |
set_panel_userptr again
Problem noted & original patch by Serhiy Storchaka; I tweaked the patch a bit.
|
|
|
|
|
|
| |
leaked.
Reported by Atsuo Ishimoto.
|
|
|
|
| |
Patch by Robin Schreiber.
|
|
|
|
| |
Patch by Robin Schreiber.
|
|
|
|
|
|
|
|
|
|
| |
svn+ssh://pythondev@svn.python.org/python/trunk
........
r81029 | antoine.pitrou | 2010-05-09 16:46:46 +0200 (dim., 09 mai 2010) | 3 lines
Untabify C files. Will watch buildbots.
........
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
svn+ssh://pythondev@svn.python.org/python/trunk
........
r78635 | victor.stinner | 2010-03-03 22:53:41 +0100 (mer., 03 mars 2010) | 5 lines
Issue #3299: fix curses.panel.new_panel() error handler, replace PyObject_DEL()
by Py_DECREF() to avoid a crash in pydebug mode.
Use po->wo==NULL to detect than the panel is in the lop list or not.
........
|
|
|
|
|
| |
type of tp_compare in a separate commit, for ease of reversion
should things go wrong.
|
|
|
|
| |
Third step: unix-only modules. Really remove the function this time.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
svn+ssh://pythondev@svn.python.org/python/branches/p3yk
................
r56477 | martin.v.loewis | 2007-07-21 09:04:38 +0200 (Sa, 21 Jul 2007) | 11 lines
Merged revisions 56466-56476 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r56476 | martin.v.loewis | 2007-07-21 08:55:02 +0200 (Sa, 21 Jul 2007) | 4 lines
PEP 3123: Provide forward compatibility with Python 3.0, while keeping
backwards compatibility. Add Py_Refcnt, Py_Type, Py_Size, and
PyVarObject_HEAD_INIT.
........
................
r56478 | martin.v.loewis | 2007-07-21 09:47:23 +0200 (Sa, 21 Jul 2007) | 2 lines
PEP 3123: Use proper C inheritance for PyObject.
................
r56479 | martin.v.loewis | 2007-07-21 10:06:55 +0200 (Sa, 21 Jul 2007) | 3 lines
Add longintrepr.h to Python.h, so that the compiler can
see that PyFalse is really some kind of PyObject*.
................
r56480 | martin.v.loewis | 2007-07-21 10:47:18 +0200 (Sa, 21 Jul 2007) | 2 lines
Qualify SHIFT, MASK, BASE.
................
r56482 | martin.v.loewis | 2007-07-21 19:10:57 +0200 (Sa, 21 Jul 2007) | 2 lines
Correctly refer to _ob_next.
................
|
|
|
|
| |
return rather than use it again.
|
|
|
|
| |
Probably should be backported.
|
|
|
|
|
|
| |
without prior setting of the userptr.
Will backport.
|
|
|
|
|
|
| |
for Py_Main().
Thanks to Kalle Svensson and Skip Montanaro for the patches.
|
| |
|
| |
|
|
|
|
| |
2.2.1 candiate (he says, largely talking to himself :)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
type.__module__ behavior.
This adds the module name and a dot in front of the type name in every
type object initializer, except for built-in types (and those that
already had this). Note that it touches lots of Mac modules -- I have
no way to test these but the changes look right. Apologies if they're
not. This also touches the weakref docs, which contains a sample type
object initializer. It also touches the mmap test output, because the
mmap type's repr is included in that output. It touches object.h to
put the correct description in a comment.
|
| |
|
| |
|
| |
|