Skip to content

Commit

Permalink
Clean: Remove unused C-API function decls
Browse files Browse the repository at this point in the history
  • Loading branch information
codewarrior0 committed Mar 3, 2016
1 parent 6e09642 commit dc88bfd
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 20 deletions.
13 changes: 1 addition & 12 deletions bootloader/src/pyi_python.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,9 @@ DECLVAR(Py_VerboseFlag);
// functions with prefix `Py_`
DECLPROC(Py_BuildValue);
DECLPROC(Py_DecRef);
DECLPROC(Py_EndInterpreter);
DECLPROC(Py_Finalize);
DECLPROC(Py_IncRef);
DECLPROC(Py_Initialize);
DECLPROC(Py_NewInterpreter);
DECLPROC(Py_SetPath);
DECLPROC(Py_SetProgramName);
DECLPROC(Py_SetPythonHome);
Expand All @@ -59,9 +57,7 @@ DECLPROC(PyDict_GetItemString);
DECLPROC(PyErr_Clear);
DECLPROC(PyErr_Occurred);
DECLPROC(PyErr_Print);
DECLPROC(PyEval_AcquireThread);
DECLPROC(PyEval_InitThreads);
DECLPROC(PyEval_ReleaseThread);

DECLPROC(PyImport_AddModule);
DECLPROC(PyImport_ExecCodeModule);
DECLPROC(PyImport_ImportModule);
Expand All @@ -78,7 +74,6 @@ DECLPROC(PySys_SetArgvEx);
DECLPROC(PySys_GetObject);
DECLPROC(PySys_SetObject);
DECLPROC(PySys_SetPath);
DECLPROC(PyThreadState_Swap);
DECLPROC(PyUnicode_FromString);

DECLPROC(Py_DecodeLocale);
Expand Down Expand Up @@ -106,11 +101,9 @@ int pyi_python_map_names(HMODULE dll, int pyvers)
// functions with prefix `Py_`
GETPROC(dll, Py_BuildValue);
GETPROC(dll, Py_DecRef);
GETPROC(dll, Py_EndInterpreter);
GETPROC(dll, Py_Finalize);
GETPROC(dll, Py_IncRef);
GETPROC(dll, Py_Initialize);
GETPROC(dll, Py_NewInterpreter);
if (pyvers >= 30) {
// new in Python 3
GETPROC(dll, Py_SetPath);
Expand All @@ -123,9 +116,6 @@ int pyi_python_map_names(HMODULE dll, int pyvers)
GETPROC(dll, PyErr_Clear);
GETPROC(dll, PyErr_Occurred);
GETPROC(dll, PyErr_Print);
GETPROC(dll, PyEval_AcquireThread);
GETPROC(dll, PyEval_InitThreads);
GETPROC(dll, PyEval_ReleaseThread);
GETPROC(dll, PyImport_AddModule);
GETPROC(dll, PyImport_ExecCodeModule);
GETPROC(dll, PyImport_ImportModule);
Expand All @@ -145,7 +135,6 @@ int pyi_python_map_names(HMODULE dll, int pyvers)
GETPROC(dll, PySys_GetObject);
GETPROC(dll, PySys_SetObject);
GETPROC(dll, PySys_SetPath);
GETPROC(dll, PyThreadState_Swap);
if (pyvers >= 30) {
// new in Python 2.6, but not reliable available in all Linux distros
GETPROC(dll, PyUnicode_FromString);
Expand Down
8 changes: 0 additions & 8 deletions bootloader/src/pyi_python.h
Original file line number Diff line number Diff line change
Expand Up @@ -134,14 +134,6 @@ EXTDECLPROC(void, PySys_AddWarnOption, (wchar_t *));
/* Return a C long representation of the contents of pylong. */
EXTDECLPROC(long, PyLong_AsLong, (PyObject *) );


/* Functions used in dllmain.c on Windows. */
EXTDECLPROC(void, PyEval_InitThreads, (void) );
EXTDECLPROC(void, PyEval_AcquireThread, (PyThreadState *) );
EXTDECLPROC(void, PyEval_ReleaseThread, (PyThreadState *) );
EXTDECLPROC(PyThreadState *, PyThreadState_Swap, (PyThreadState *) );
EXTDECLPROC(PyThreadState *, Py_NewInterpreter, (void) );
EXTDECLPROC(void, Py_EndInterpreter, (PyThreadState *) );
EXTDECLPROC(int, PySys_SetObject, (char *, PyObject *));

/* Used to convert argv to wchar_t on Linux/OS X */
Expand Down

0 comments on commit dc88bfd

Please sign in to comment.