summaryrefslogtreecommitdiffstats
path: root/Include/ceval.h
Commit message (Collapse)AuthorAgeFilesLines
* bpo-30022: Get rid of using EnvironmentError and IOError (except test… (#1051)Serhiy Storchaka2017-04-161-2/+2
|
* bpo-29935: Fixed error messages in the index() method of tuple, list and ↵Serhiy Storchaka2017-03-301-1/+1
| | | | | deque (#887) when pass indices of wrong type.
* bpo-29748: Added the slice index converter in Argument Clinic. (#549)Serhiy Storchaka2017-03-191-0/+1
|
* bpo-29548: Recommend PyObject_Call APIs over PyEval_Call APIs. (GH-75)INADA Naoki2017-03-141-0/+6
| | | | | | | | | | | | PyEval_Call* APIs are not documented and they doesn't respect PY_SSIZE_T_CLEAN. So add comment block which recommends PyObject_Call* APIs to ceval.h. This commit also changes PyEval_CallMethod and PyEval_CallFunction implementation same to PyObject_CallMethod and PyObject_CallFunction to reduce future maintenance cost. Optimization to avoid temporary tuple are copied too. PyEval_CallFunction(callable, "i", (int)i) now calls callable(i) instead of raising TypeError. But accepting this edge case is backward compatible.
* Uniformize argument names of "call" functionsVictor Stinner2016-12-061-5/+7
| | | | | | | | | | | | Issue #28838: Rename parameters of the "calls" functions of the Python C API. * Rename 'callable_object' and 'func' to 'callable': any Python callable object is accepted, not only Python functions * Rename 'method' and 'nameid' to 'name' (method name) * Rename 'o' to 'obj' * Move, fix and update documentation of PyObject_CallXXX() functions in abstract.h * Update also the documentaton of the C API (update parameter names)
* Backed out changeset 7efddbf1aa70Victor Stinner2016-11-301-2/+2
|
* Uniformize argument names of "call" functionsVictor Stinner2016-11-291-2/+2
| | | | | | | | | | | | * Callable object: callable, o, callable_object => func * Object for method calls: o => obj * Method name: name or nameid => method Cleanup also the C code: * Don't initialize variables to NULL if they are not used before their first assignement * Add braces for readability
* Remove CALL_PROFILE special buildVictor Stinner2016-11-281-1/+0
| | | | | | | | | | | Issue #28799: * Remove the PyEval_GetCallStats() function. * Deprecate the untested and undocumented sys.callstats() function. * Remove the CALL_PROFILE special build Use the sys.setprofile() function, cProfile or profile module to profile function calls.
* Issue #19569: Compiler warnings are now emitted if use most of deprecatedSerhiy Storchaka2016-11-201-2/+2
| | | | functions.
* Issue #26900: Excluded underscored names and other private API from limited API.Serhiy Storchaka2016-09-111-0/+2
|
* Issue #28003: Implement PEP 525 -- Asynchronous Generators.Yury Selivanov2016-09-091-0/+4
|
* Add the co_extra field and accompanying APIs to code objects.Brett Cannon2016-09-071-0/+4
| | | | This completes PEP 523.
* Implement the frame evaluation API aspect of PEP 523.Brett Cannon2016-09-051-0/+3
|
* Fix PyObject_Call() parameter namesVictor Stinner2016-08-191-1/+1
| | | | | | Issue #27128: arg=>args, kw=>kwargs. Same change for PyEval_CallObjectWithKeywords().
* Issue 25483: Add an opcode to make f-string formatting more robust.Eric V. Smith2015-11-031-0/+8
|
* sys.setrecursionlimit() now raises RecursionErrorVictor Stinner2015-10-121-3/+9
| | | | | | | Issue #25274: sys.setrecursionlimit() now raises a RecursionError if the new recursion limit is too low depending at the current recursion depth. Modify also the "lower-water mark" formula to make it monotonic. This mark is used to decide when the overflowed flag of the thread state is reset.
* Issue #19235: Add new RecursionError exception. Patch by Georg Brandl.Yury Selivanov2015-07-031-3/+3
|
* Added the const qualifier for char* argument of Py_EnterRecursiveCall().Serhiy Storchaka2015-06-211-1/+1
|\
| * Added the const qualifier for char* argument of Py_EnterRecursiveCall().Serhiy Storchaka2015-06-211-1/+1
| |
* | Issue 24342: No need to use PyAPI_FUNC for _PyEval_ApplyCoroutineWrapperYury Selivanov2015-06-031-1/+0
| |
* | Issue 24342: Let wrapper set by sys.set_coroutine_wrapper fail gracefullyYury Selivanov2015-06-021-1/+2
| |
* | Issue 24017: Make PyEval_(Set|Get)CoroutineWrapper privateYury Selivanov2015-06-011-2/+2
| |
* | Fix warnings for PyEval_GetCoroutineWrapperYury Selivanov2015-05-121-1/+1
| |
* | PEP 0492 -- Coroutines with async and await syntax. Issue #24017.Yury Selivanov2015-05-121-0/+2
|/
* Merge branches/pep-0384.Martin v. Löwis2010-12-031-0/+8
|
* Issue #9828: Destroy the GIL in Py_Finalize(), so that it gets properlyAntoine Pitrou2010-09-131-0/+1
| | | | | re-created on a subsequent call to Py_Initialize(). The problem (a crash) wouldn't appear in 3.1 or 2.7 where the GIL's structure is more trivial.
* Recorded merge of revisions 81029 via svnmerge fromAntoine Pitrou2010-05-091-34/+34
| | | | | | | | | | 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 79555 via svnmerge fromAntoine Pitrou2010-04-011-4/+0
| | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r79555 | antoine.pitrou | 2010-04-01 18:42:11 +0200 (jeu., 01 avril 2010) | 5 lines Issue #8276: PyEval_CallObject() is now only available in macro form. The function declaration, which was kept for backwards compatibility reasons, is now removed (the macro was introduced in 1997!). ........
* Merge in the new GIL.Antoine Pitrou2009-11-101-4/+4
|
* Issue #5392: when a very low recursion limit was set, the interpreter wouldAntoine Pitrou2009-03-131-5/+4
| | | | abort with a fatal error after the recursion limit was hit twice.
* Issue #3697: "Fatal Python error: Cannot recover from stack overflow"Antoine Pitrou2008-09-031-7/+43
| | | | | | | | could be easily encountered under Windows in debug mode when exercising the recursion limit checking code, due to bogus handling of recursion limit when USE_STACKCHEK was enabled. Reviewed by Amaury Forgeot d'Arc on IRC.
* Rename thread to _thread and dummy_thread to _dummy_thread. Issue #2875.Georg Brandl2008-05-251-1/+1
|
* Bug #1595: Remove extra semicolon.Martin v. Löwis2008-02-121-1/+1
|
* Make identifiers str (not str8) objects throughout.Martin v. Löwis2007-06-101-1/+12
| | | | | | | | | | | | | | | | | | | This affects the parser, various object implementations, and all places that put identifiers into C string literals. In testing, a number of crashes occurred as code would fail when the recursion limit was reached (such as the Unicode interning dictionary having key/value pairs where key is not value). To solve these, I added an overflowed flag, which allows for 50 more recursions after the limit was reached and the exception was raised, and a recursion_critical flag, which indicates that recursion absolutely must be allowed, i.e. that a certain call must not cause a stack overflow exception. There are still some places where both str and str8 are accepted as identifiers; these should eventually be removed.
* Merged revisions 55270-55324 via svnmerge fromGuido van Rossum2007-05-141-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/p3yk ........ r55271 | fred.drake | 2007-05-11 10:14:47 -0700 (Fri, 11 May 2007) | 3 lines remove jpeg, panel libraries for SGI; there is more IRIX stuff left over, I guess that should be removed too, but will leave for someone who is sure ........ r55280 | fred.drake | 2007-05-11 19:11:37 -0700 (Fri, 11 May 2007) | 1 line remove mention of file that has been removed ........ r55301 | brett.cannon | 2007-05-13 17:38:05 -0700 (Sun, 13 May 2007) | 4 lines Remove rexec and Bastion from the stdlib. This also eliminates the need for f_restricted on frames. This in turn negates the need for PyEval_GetRestricted() and PyFrame_IsRestricted(). ........ r55303 | brett.cannon | 2007-05-13 19:22:22 -0700 (Sun, 13 May 2007) | 2 lines Remove the md5 and sha modules. ........ r55305 | george.yoshida | 2007-05-13 19:45:55 -0700 (Sun, 13 May 2007) | 2 lines fix markup ........ r55306 | neal.norwitz | 2007-05-13 19:47:57 -0700 (Sun, 13 May 2007) | 1 line Get the doc building again after some removals. ........ r55307 | neal.norwitz | 2007-05-13 19:50:45 -0700 (Sun, 13 May 2007) | 1 line Get test_pyclbr passing again after getstatus was removed from commands. This "test case" was weird since it was just importing a seemingly random module. Remove the import ........ r55322 | brett.cannon | 2007-05-14 14:09:20 -0700 (Mon, 14 May 2007) | 3 lines Remove the compiler package. Will eventually need a mechanism to byte compile an AST. ........
* Kill off softspace completely (except in formatter.py which seems to haveGuido van Rossum2007-02-091-2/+0
| | | | | a different feature with the same name). The change to test_doctest.txt reduces the doctest failures to 3.
* Merge ssize_t branch.Martin v. Löwis2006-02-151-1/+1
|
* Add const to several API functions that take char *.Jeremy Hylton2005-12-101-4/+6
| | | | | | | | | | | | | | | | | | | In C++, it's an error to pass a string literal to a char* function without a const_cast(). Rather than require every C++ extension module to put a cast around string literals, fix the API to state the const-ness. I focused on parts of the API where people usually pass literals: PyArg_ParseTuple() and friends, Py_BuildValue(), PyMethodDef, the type slots, etc. Predictably, there were a large set of functions that needed to be fixed as a result of these changes. The most pervasive change was to make the keyword args list passed to PyArg_ParseTupleAndKewords() to be a const char *kwlist[]. One cast was required as a result of the changes: A type object mallocs the memory for its tp_doc slot and later frees it. PyTypeObject says that tp_doc is const char *; but if the type was created by type_new(), we know it is safe to cast to char *.
* PEP 342 implementation. Per Guido's comments, the generator throw()Phillip J. Eby2005-08-021-0/+1
| | | | | method still needs to support string exceptions, and allow None for the third argument. Documentation updates are needed, too.
* SF patch 1044089: New C API function PyEval_ThreadsInitialized(), by NickTim Peters2004-10-111-0/+1
| | | | | Coghlan, for determining whether PyEval_InitThreads() has been called. Also purged the undocumented+unused _PyThread_Started int.
* Patch #966493: Cleanup generator/eval_frame exposure.Martin v. Löwis2004-06-271-1/+1
|
* Patch #957398: Add public API for Generator Object/Type.Martin v. Löwis2004-06-011-0/+1
|
* Deleting cyclic object comparison.Armin Rigo2003-10-281-0/+14
| | | | | SF patch 825639 http://mail.python.org/pipermail/python-dev/2003-October/039445.html
* As far as I can tell PyEval_GetOwner was removed in 1997 (when it wasMichael W. Hudson2003-02-201-1/+0
| | | | | called something else!). I can't imagine removing the prototype is going to hurt, but put it back if *you* can.
* - PyEval_GetFrame() is now declared to return a PyFrameObject *Guido van Rossum2003-02-191-1/+3
| | | | instead of a plain PyObject *. (SF patch #686601 by Ben Laurie.)
* Small function call optimization and special build option for call stats.Jeremy Hylton2003-02-051-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | -DCALL_PROFILE: Count the number of function calls executed. When this symbol is defined, the ceval mainloop and helper functions count the number of function calls made. It keeps detailed statistics about what kind of object was called and whether the call hit any of the special fast paths in the code. Optimization: When we take the fast_function() path, which seems to be taken for most function calls, and there is minimal frame setup to do, avoid call PyEval_EvalCodeEx(). The eval code ex function does a lot of work to handle keywords args and star args, free variables, generators, etc. The inlined version simply allocates the frame and copies the arguments values into the frame. The optimization gets a little help from compile.c which adds a CO_NOFREE flag to code objects that don't have free variables or cell variables. This change allows fast_function() to get into the fast path with fewer tests. I measure a couple of percent speedup in pystone with this change, but there's surely more that can be done.
* replace thread state objects' ticker and checkinterval fields with twoSkip Montanaro2002-09-031-0/+4
| | | | | | | | | | globals, _Py_Ticker and _Py_CheckInterval. This also implements Jeremy's shortcut in Py_AddPendingCall that zeroes out _Py_Ticker. This allows the test in the main loop to only test a single value. The gory details are at http://python.org/sf/602191
* Excise DL_EXPORT from Include.Mark Hammond2002-08-121-30/+30
| | | | Thanks to Skip Montanaro and Kalle Svensson for the patches.
* Merge of descr-branch back into trunk.Tim Peters2001-08-021-0/+3
|
* Part way to allowing "from __future__ import generators" to communicateTim Peters2001-07-161-1/+5
| | | | | | | | | | that info to code dynamically compiled *by* code compiled with generators enabled. Doesn't yet work because there's still no way to tell the parser that "yield" is OK (unlike nested_scopes, the parser has its fingers in this too). Replaced PyEval_GetNestedScopes by a more-general PyEval_MergeCompilerFlags. Perhaps I should not have? I doubted it was *intended* to be part of the public API, so just did.