@@ -2091,17 +2091,6 @@ static PyMethodDef imp_methods[] = {
20912091 {NULL , NULL } /* sentinel */
20922092};
20932093
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- }
21052094
21062095static struct PyModuleDef impmodule = {
21072096 PyModuleDef_HEAD_INIT ,
@@ -2127,17 +2116,6 @@ PyInit_imp(void)
21272116 if (d == NULL )
21282117 goto failure ;
21292118
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-
21412119 return m ;
21422120 failure :
21432121 Py_XDECREF (m );
0 commit comments