mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-24 14:22:28 +00:00
Revert "Backport METH_FASTCALL from Python 3.7 (#328)"
This reverts commit cf73bbd678
.
This commit is contained in:
parent
e7611a8476
commit
2ea1dc405c
102 changed files with 3299 additions and 2894 deletions
22
third_party/python/Include/pyport.h
vendored
22
third_party/python/Include/pyport.h
vendored
|
@ -235,28 +235,6 @@ typedef int Py_ssize_clean_t;
|
|||
#define Py_DEPRECATED(VERSION_UNUSED)
|
||||
#endif
|
||||
|
||||
/* _Py_HOT_FUNCTION
|
||||
* The hot attribute on a function is used to inform the compiler that the
|
||||
* function is a hot spot of the compiled program. The function is optimized
|
||||
* more aggressively and on many target it is placed into special subsection of
|
||||
* the text section so all hot functions appears close together improving
|
||||
* locality.
|
||||
*
|
||||
* Usage:
|
||||
* int _Py_HOT_FUNCTION x(void) { return 3; }
|
||||
*
|
||||
* Issue #28618: This attribute must not be abused, otherwise it can have a
|
||||
* negative effect on performance. Only the functions were Python spend most of
|
||||
* its time must use it. Use a profiler when running performance benchmark
|
||||
* suite to find these functions.
|
||||
*/
|
||||
#if !IsModeDbg() && defined(__GNUC__) \
|
||||
&& ((__GNUC__ >= 5) || (__GNUC__ == 4) && (__GNUC_MINOR__ >= 3))
|
||||
#define _Py_HOT_FUNCTION __attribute__((hot))
|
||||
#else
|
||||
#define _Py_HOT_FUNCTION
|
||||
#endif
|
||||
|
||||
#define RTYPE RTYPE
|
||||
#ifdef __cplusplus
|
||||
#define PyMODINIT_FUNC extern "C" PyObject *
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue