Skip to content

Commit 5d908b4

Browse files
Move to macros to internal header
1 parent 19e02c2 commit 5d908b4

File tree

2 files changed

+18
-18
lines changed

2 files changed

+18
-18
lines changed

Include/internal/pycore_ceval.h

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -394,6 +394,24 @@ _PyForIter_VirtualIteratorNext(PyThreadState* tstate, struct _PyInterpreterFrame
394394
/* Special counterparts of ceval functions for performance reasons */
395395
PyAPI_FUNC(int) _PyEval_Mapping_GetOptionalItem(PyObject *obj, PyObject *key, PyObject **result);
396396

397+
#if defined(_MSC_VER) && !defined(__clang__) && _Py_TAIL_CALL_INTERP
398+
# define Py_NO_INLINE_MSVC_TAILCALL Py_NO_INLINE
399+
#else
400+
# define Py_NO_INLINE_MSVC_TAILCALL
401+
#endif
402+
403+
#if defined(_MSC_VER) && !defined(__clang__)
404+
# define Py_MSVC_RESTRICT restrict
405+
#else
406+
# define Py_MSVC_RESTRICT
407+
#endif
408+
409+
// Just a scope. Hints to the programmer
410+
// That any local variable defined within this block MUST
411+
// not escape from the current definition.
412+
# define Py_BEGIN_LOCALS_MUST_NOT_ESCAPE() {
413+
# define Py_END_LOCALS_MUST_NOT_ESCAPE() }
414+
397415
#ifdef __cplusplus
398416
}
399417
#endif

Include/pyport.h

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -385,24 +385,6 @@ extern "C" {
385385
# define Py_NO_INLINE
386386
#endif
387387

388-
#if defined(_MSC_VER) && !defined(__clang__) && _Py_TAIL_CALL_INTERP
389-
# define Py_NO_INLINE_MSVC_TAILCALL Py_NO_INLINE
390-
#else
391-
# define Py_NO_INLINE_MSVC_TAILCALL
392-
#endif
393-
394-
#if defined(_MSC_VER) && !defined(__clang__)
395-
# define Py_MSVC_RESTRICT restrict
396-
#else
397-
# define Py_MSVC_RESTRICT
398-
#endif
399-
400-
// Just a scope. Hints to the programmer
401-
// That any local variable defined within this block MUST
402-
// not escape from the current definition.
403-
# define Py_BEGIN_LOCALS_MUST_NOT_ESCAPE() {
404-
# define Py_END_LOCALS_MUST_NOT_ESCAPE() }
405-
406388
#include "exports.h"
407389

408390
#ifdef Py_LIMITED_API

0 commit comments

Comments
 (0)