summaryrefslogtreecommitdiffstats
path: root/Include
diff options
context:
space:
mode:
authorIrit Katriel <1055913+iritkatriel@users.noreply.github.com>2024-08-14 05:17:04 (GMT)
committerGitHub <noreply@github.com>2024-08-14 05:17:04 (GMT)
commit05fc4d758aa9b731c722e6c1c18e1f5e54597393 (patch)
tree13f4ccc8f86e6bc7c9b5b3a537be3ddd08298205 /Include
parente03073ff20107793a4ea28cdac0d6894774dd110 (diff)
downloadcpython-05fc4d758aa9b731c722e6c1c18e1f5e54597393.zip
cpython-05fc4d758aa9b731c722e6c1c18e1f5e54597393.tar.gz
cpython-05fc4d758aa9b731c722e6c1c18e1f5e54597393.tar.bz2
gh-122985: add SYMBOL_TO_SCOPE macro in symtable (#122986)
Diffstat (limited to 'Include')
-rw-r--r--Include/internal/pycore_symtable.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/Include/internal/pycore_symtable.h b/Include/internal/pycore_symtable.h
index b449e8b..7e3d45a 100644
--- a/Include/internal/pycore_symtable.h
+++ b/Include/internal/pycore_symtable.h
@@ -171,6 +171,7 @@ extern PyObject* _Py_Mangle(PyObject *p, PyObject *name);
*/
#define SCOPE_OFFSET 12
#define SCOPE_MASK (DEF_GLOBAL | DEF_LOCAL | DEF_PARAM | DEF_NONLOCAL)
+#define SYMBOL_TO_SCOPE(S) (((S) >> SCOPE_OFFSET) & SCOPE_MASK)
#define LOCAL 1
#define GLOBAL_EXPLICIT 2