summaryrefslogtreecommitdiffstats
path: root/Modules/_curses_panel.c
Commit message (Collapse)AuthorAgeFilesLines
* bpo-43916: Add Py_TPFLAGS_DISALLOW_INSTANTIATION type flag (GH-25721)Victor Stinner2021-04-301-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* bpo-41604: Don't decrement the reference count of the previous user_ptr when ↵Anonymous Maarten2021-01-311-1/+3
| | | | set_panel_usertpr fails (GH-21933)
* bpo-42694: Prevent creating _curses_panel.panel (GH-23948)Victor Stinner2020-12-261-1/+2
| | | | | Fix regression introduced in commit 1baf030a902392fe92d934ed0fb6a385cf7d8869: restore removed code to prevent creating a _curses_panel.panel instance directly.
* bpo-42519: Replace PyObject_MALLOC() with PyObject_Malloc() (GH-23587)Victor Stinner2020-12-011-1/+1
| | | | | | | | | 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()
* bpo-1635741 port _curses_panel to multi-phase init (PEP 489) (GH-21986)Mohamed Koubaa2020-09-071-114/+154
|
* bpo-40217: Ensure Py_VISIT(Py_TYPE(self)) is always called for ↵Pablo Galindo2020-05-271-0/+1
| | | | | | | | | 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
* bpo-40170: PyObject_NEW() becomes an alias to PyObject_New() (GH-19379)Victor Stinner2020-04-071-1/+1
| | | | | | | | | | | | 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().
* bpo-39968: Convert extension modules' macros of get_module_state() to inline ↵Hai Shi2020-03-161-8/+15
| | | | functions (GH-19017)
* bpo-39573: Clean up modules and headers to use Py_IS_TYPE() function (GH-18521)Dong-hee Na2020-02-171-1/+1
|
* bpo-35810: Incref heap-allocated types in PyObject_Init (GH-11661)Eddie Elizondo2019-03-271-1/+5
| | | | | * Incref heap-allocated types in PyObject_Init * Add documentation and porting notes to What's New
* bpo-36101: remove non-ascii characters in docstring (GH-12018)animalize2019-02-241-4/+4
| | | | | * remove non-ascii characters in docstring * clinic.py emits a warning when docstring has non-ascii character
* bpo-20171: Convert the _curses and _curses_panel modules to Argument Clinic. ↵Serhiy Storchaka2018-05-101-74/+210
| | | | (GH-4251)
* Issue #28999: Use Py_RETURN_NONE, Py_RETURN_TRUE and Py_RETURN_FALSE whereverSerhiy Storchaka2017-01-231-16/+9
| | | | possible. Patch is writen with Coccinelle.
* Issue #25745: Fixed leaking a userptr in curses panel destructor.Serhiy Storchaka2016-05-081-0/+5
|\
| * Issue #25745: Fixed leaking a userptr in curses panel destructor.Serhiy Storchaka2016-05-081-0/+5
| |
* | Issue #23815: Fixed crashes related to directly created instances of types inSerhiy Storchaka2016-05-081-3/+4
|\ \ | |/ | | | | _tkinter and curses.panel modules.
| * Issue #23815: Fixed crashes related to directly created instances of types inSerhiy Storchaka2016-05-081-3/+4
| | | | | | | | _tkinter and curses.panel modules.
* | Issue #26200: Added Py_SETREF and replaced Py_XSETREF with Py_SETREFSerhiy Storchaka2016-04-101-1/+1
|\ \ | |/ | | | | in places where Py_DECREF was used.
| * Issue #26200: Added Py_SETREF and replaced Py_XSETREF with Py_SETREFSerhiy Storchaka2016-04-101-1/+1
| | | | | | | | in places where Py_DECREF was used.
* | Issue #22570: Renamed Py_SETREF to Py_XSETREF.Serhiy Storchaka2016-04-061-1/+1
|\ \ | |/
| * Issue #22570: Renamed Py_SETREF to Py_XSETREF.Serhiy Storchaka2016-04-061-1/+1
| |
* | Issue #25923: Added more const qualifiers to signatures of static and ↵Serhiy Storchaka2015-12-251-1/+1
| | | | | | | | private functions.
* | Issue #25923: Added the const qualifier to static constant arrays.Serhiy Storchaka2015-12-251-1/+1
|/
* Issue #20440: Massive replacing unsafe attribute setting code with specialSerhiy Storchaka2015-12-241-3/+2
| | | | macro Py_SETREF.
* Issue #18408: Fix PyInit__curses_panel(), handle import_curses() failureVictor Stinner2013-07-181-0/+2
| | | | | Don't call PyErr_NewException() if an exception is set, or type_call() would fail with an assertion error.
* Issue #18203: Replace malloc() with PyMem_Malloc() in Python modulesVictor Stinner2013-07-071-3/+3
| | | | | Replace malloc() with PyMem_Malloc() when the GIL is held, or with PyMem_RawMalloc() otherwise.
* #18113: avoid segfault if Py_XDECREF triggers code that calls ↵Andrew Kuchling2013-06-221-3/+8
| | | | | | set_panel_userptr again Problem noted & original patch by Serhiy Storchaka; I tweaked the patch a bit.
* #18113: Objects associated to a curses.panel object with set_userptr() were ↵Andrew Kuchling2013-06-151-0/+4
| | | | | | leaked. Reported by Atsuo Ishimoto.
* Issue #14936: curses_panel was converted to PEP 3121 and PEP 384 API.Martin v. Löwis2012-06-141-43/+29
| | | | Patch by Robin Schreiber.
* Issue #14936: curses_panel was converted to PEP 3121 API.Martin v. Löwis2012-06-141-12/+42
| | | | Patch by Robin Schreiber.
* Recorded merge of revisions 81029 via svnmerge fromAntoine Pitrou2010-05-091-113/+113
| | | | | | | | | | 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. ........
* Merged revisions 78635 via svnmerge fromVictor Stinner2010-03-031-5/+8
| | | | | | | | | | | | | 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. ........
* Issue #1717: rename tp_compare to tp_reserved. I'll change theMark Dickinson2009-02-021-1/+1
| | | | | type of tp_compare in a separate commit, for ease of reversion should things go wrong.
* #3247: get rid of Py_FindMethodAmaury Forgeot d'Arc2008-07-021-9/+18
| | | | Third step: unix-only modules. Really remove the function this time.
* Implement PEP 3121: new module initialization and finalization API.Martin v. Löwis2008-06-111-3/+17
|
* #1629: Renamed Py_Size, Py_Type and Py_Refcnt to Py_SIZE, Py_TYPE and Py_REFCNT.Christian Heimes2007-12-191-2/+2
|
* Convert a bunch of constant strings in C to unicode.Neal Norwitz2007-08-231-1/+1
|
* Merged revisions 56467-56482 via svnmerge fromMartin v. Löwis2007-07-211-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. ................
* Coverity-found bug: don't use temp->next *before* checking it for NULL. AlsoThomas Wouters2006-03-071-2/+4
| | | | return rather than use it again.
* Check return result from Py_InitModule*(). This API can fail.Neal Norwitz2006-01-191-0/+2
| | | | Probably should be backported.
* Bug #1400115, Fix segfault when calling curses.panel.userptr()Neal Norwitz2006-01-091-0/+5
| | | | | | without prior setting of the userptr. Will backport.
* Excise DL_EXPORT/DL_IMPORT from Modules/*. Required adding a prototypeMark Hammond2002-08-021-1/+1
| | | | | | for Py_Main(). Thanks to Kalle Svensson and Skip Montanaro for the patches.
* Fix whitespaceNeal Norwitz2002-03-311-2/+1
|
* Remove many uses of PyArg_NoArgs macro, change METH_OLDARGS to METH_NOARGS.Neal Norwitz2002-03-251-12/+7
|
* Oh look, another one.Michael W. Hudson2002-01-301-1/+1
| | | | 2.2.1 candiate (he says, largely talking to himself :)
* Patch #477752: Drop old-style getargs from curses.Martin v. Löwis2002-01-171-41/+23
|
* Patch supplied by Burton Radons for his own SF bug #487390: ModifyingGuido van Rossum2001-12-081-1/+1
| | | | | | | | | | | | | 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.
* Cast argument to set_panel_userptr to void*. Fixes bug #417240.Martin v. Löwis2001-10-131-1/+1
|
* init_curses_panel(): Be more consistent with indentation and blank lines.Fred Drake2001-01-271-5/+3
|
* SF Patch #103185, by jlt63: Some more standard modules cleanup for CygwinGuido van Rossum2001-01-221-2/+5
|