]> git.proxmox.com Git - mirror_edk2.git/blobdiff - AppPkg/Applications/Python/Python-2.7.10/Modules/symtablemodule.c
edk2: Remove AppPkg, StdLib, StdLibPrivateInternalFiles
[mirror_edk2.git] / AppPkg / Applications / Python / Python-2.7.10 / Modules / symtablemodule.c
diff --git a/AppPkg/Applications/Python/Python-2.7.10/Modules/symtablemodule.c b/AppPkg/Applications/Python/Python-2.7.10/Modules/symtablemodule.c
deleted file mode 100644 (file)
index a4f60a1..0000000
+++ /dev/null
@@ -1,86 +0,0 @@
-#include "Python.h"\r
-\r
-#include "code.h"\r
-#include "compile.h"\r
-#include "Python-ast.h"\r
-#include "symtable.h"\r
-\r
-static PyObject *\r
-symtable_symtable(PyObject *self, PyObject *args)\r
-{\r
-    struct symtable *st;\r
-    PyObject *t;\r
-\r
-    char *str;\r
-    char *filename;\r
-    char *startstr;\r
-    int start;\r
-\r
-    if (!PyArg_ParseTuple(args, "sss:symtable", &str, &filename,\r
-                          &startstr))\r
-        return NULL;\r
-    if (strcmp(startstr, "exec") == 0)\r
-        start = Py_file_input;\r
-    else if (strcmp(startstr, "eval") == 0)\r
-        start = Py_eval_input;\r
-    else if (strcmp(startstr, "single") == 0)\r
-        start = Py_single_input;\r
-    else {\r
-        PyErr_SetString(PyExc_ValueError,\r
-           "symtable() arg 3 must be 'exec' or 'eval' or 'single'");\r
-        return NULL;\r
-    }\r
-    st = Py_SymtableString(str, filename, start);\r
-    if (st == NULL)\r
-        return NULL;\r
-    t = (PyObject *)st->st_top;\r
-    Py_INCREF(t);\r
-    PyMem_Free((void *)st->st_future);\r
-    PySymtable_Free(st);\r
-    return t;\r
-}\r
-\r
-static PyMethodDef symtable_methods[] = {\r
-    {"symtable",        symtable_symtable,      METH_VARARGS,\r
-     PyDoc_STR("Return symbol and scope dictionaries"\r
-               " used internally by compiler.")},\r
-    {NULL,              NULL}           /* sentinel */\r
-};\r
-\r
-PyMODINIT_FUNC\r
-init_symtable(void)\r
-{\r
-    PyObject *m;\r
-\r
-    if (PyType_Ready(&PySTEntry_Type) < 0)\r
-        return;\r
-\r
-    m = Py_InitModule("_symtable", symtable_methods);\r
-    if (m == NULL)\r
-        return;\r
-    PyModule_AddIntConstant(m, "USE", USE);\r
-    PyModule_AddIntConstant(m, "DEF_GLOBAL", DEF_GLOBAL);\r
-    PyModule_AddIntConstant(m, "DEF_LOCAL", DEF_LOCAL);\r
-    PyModule_AddIntConstant(m, "DEF_PARAM", DEF_PARAM);\r
-    PyModule_AddIntConstant(m, "DEF_FREE", DEF_FREE);\r
-    PyModule_AddIntConstant(m, "DEF_FREE_CLASS", DEF_FREE_CLASS);\r
-    PyModule_AddIntConstant(m, "DEF_IMPORT", DEF_IMPORT);\r
-    PyModule_AddIntConstant(m, "DEF_BOUND", DEF_BOUND);\r
-\r
-    PyModule_AddIntConstant(m, "TYPE_FUNCTION", FunctionBlock);\r
-    PyModule_AddIntConstant(m, "TYPE_CLASS", ClassBlock);\r
-    PyModule_AddIntConstant(m, "TYPE_MODULE", ModuleBlock);\r
-\r
-    PyModule_AddIntConstant(m, "OPT_IMPORT_STAR", OPT_IMPORT_STAR);\r
-    PyModule_AddIntConstant(m, "OPT_EXEC", OPT_EXEC);\r
-    PyModule_AddIntConstant(m, "OPT_BARE_EXEC", OPT_BARE_EXEC);\r
-\r
-    PyModule_AddIntConstant(m, "LOCAL", LOCAL);\r
-    PyModule_AddIntConstant(m, "GLOBAL_EXPLICIT", GLOBAL_EXPLICIT);\r
-    PyModule_AddIntConstant(m, "GLOBAL_IMPLICIT", GLOBAL_IMPLICIT);\r
-    PyModule_AddIntConstant(m, "FREE", FREE);\r
-    PyModule_AddIntConstant(m, "CELL", CELL);\r
-\r
-    PyModule_AddIntConstant(m, "SCOPE_OFF", SCOPE_OFF);\r
-    PyModule_AddIntConstant(m, "SCOPE_MASK", SCOPE_MASK);\r
-}\r