| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 2d3ce9d commit 0429e1a
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -2091,17 +2091,6 @@ static PyMethodDef imp_methods[] = { | |||
| 2091 | 2091 | {NULL, NULL} /* sentinel */ | |
| 2092 | 2092 | }; | |
| 2093 | 2093 | ||
| 2094 | - static int | ||
| 2095 | - setint(PyObject *d, char *name, int value) | ||
| 2096 | - { | ||
| 2097 | - PyObject *v; | ||
| 2098 | - int err; | ||
| 2099 | - | ||
| 2100 | - v = PyLong_FromLong((long)value); | ||
| 2101 | - err = PyDict_SetItemString(d, name, v); | ||
| 2102 | - Py_XDECREF(v); | ||
| 2103 | - return err; | ||
| 2104 | - } | ||
| 2105 | 2094 | ||
| 2106 | 2095 | static struct PyModuleDef impmodule = { | |
| 2107 | 2096 | PyModuleDef_HEAD_INIT, | |
@@ -2127,17 +2116,6 @@ PyInit_imp(void) | |||
| 2127 | 2116 | if (d == NULL) | |
| 2128 | 2117 | goto failure; | |
| 2129 | 2118 | ||
| 2130 | - if (setint(d, "SEARCH_ERROR", SEARCH_ERROR) < 0) goto failure; | ||
| 2131 | - if (setint(d, "PY_SOURCE", PY_SOURCE) < 0) goto failure; | ||
| 2132 | - if (setint(d, "PY_COMPILED", PY_COMPILED) < 0) goto failure; | ||
| 2133 | - if (setint(d, "C_EXTENSION", C_EXTENSION) < 0) goto failure; | ||
| 2134 | - if (setint(d, "PY_RESOURCE", PY_RESOURCE) < 0) goto failure; | ||
| 2135 | - if (setint(d, "PKG_DIRECTORY", PKG_DIRECTORY) < 0) goto failure; | ||
| 2136 | - if (setint(d, "C_BUILTIN", C_BUILTIN) < 0) goto failure; | ||
| 2137 | - if (setint(d, "PY_FROZEN", PY_FROZEN) < 0) goto failure; | ||
| 2138 | - if (setint(d, "PY_CODERESOURCE", PY_CODERESOURCE) < 0) goto failure; | ||
| 2139 | - if (setint(d, "IMP_HOOK", IMP_HOOK) < 0) goto failure; | ||
| 2140 | - | ||
| 2141 | 2119 | return m; | |
| 2142 | 2120 | failure: | |
| 2143 | 2121 | Py_XDECREF(m); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -6,21 +6,6 @@ extern "C" { | |||
| 6 | 6 | #endif | |
| 7 | 7 | ||
| 8 | 8 | ||
| 9 | - /* Definitions for dynamic loading of extension modules */ | ||
| 10 | - enum filetype { | ||
| 11 | - SEARCH_ERROR, | ||
| 12 | - PY_SOURCE, | ||
| 13 | - PY_COMPILED, | ||
| 14 | - C_EXTENSION, | ||
| 15 | - PY_RESOURCE, /* Mac only */ | ||
| 16 | - PKG_DIRECTORY, | ||
| 17 | - C_BUILTIN, | ||
| 18 | - PY_FROZEN, | ||
| 19 | - PY_CODERESOURCE, /* Mac only */ | ||
| 20 | - IMP_HOOK | ||
| 21 | - }; | ||
| 22 | - | ||
| 23 | - | ||
| 24 | 9 | extern const char *_PyImport_DynLoadFiletab[]; | |
| 25 | 10 | ||
| 26 | 11 | extern PyObject *_PyImport_LoadDynamicModule(PyObject *name, PyObject *pathname, | |
| Back | FazBrowse Home | New Git URL |
0 commit comments