From 2acd881d19b735c56d9e0ff0ff92a863251293de Mon Sep 17 00:00:00 2001 From: Andy C Date: Sun, 5 Jan 2025 19:48:37 -0500 Subject: [PATCH] [build] Remove references to build/cpython-defs This failed as of the last release --- Python-2.7.13/Modules/_codecsmodule.c | 4 ---- Python-2.7.13/Modules/cStringIO.c | 12 ------------ Python-2.7.13/Modules/errnomodule.c | 4 ---- Python-2.7.13/Modules/fcntlmodule.c | 4 ---- Python-2.7.13/Modules/gcmodule.c | 4 ---- Python-2.7.13/Modules/posixmodule.c | 4 ---- Python-2.7.13/Modules/pwdmodule.c | 4 ---- Python-2.7.13/Modules/readline.c | 4 ---- Python-2.7.13/Modules/resource.c | 4 ---- Python-2.7.13/Modules/signalmodule.c | 4 ---- Python-2.7.13/Modules/termios.c | 4 ---- Python-2.7.13/Modules/timemodule.c | 4 ---- Python-2.7.13/Modules/zipimport.c | 4 ---- Python-2.7.13/Objects/enumobject.c | 4 ---- Python-2.7.13/Objects/exceptions.c | 12 ------------ Python-2.7.13/Objects/fileobject.c | 4 ---- Python-2.7.13/Objects/floatobject.c | 4 ---- Python-2.7.13/Objects/frameobject.c | 4 ---- Python-2.7.13/Objects/genobject.c | 4 ---- Python-2.7.13/Objects/intobject.c | 4 ---- Python-2.7.13/Objects/iterobject.c | 4 ---- Python-2.7.13/Objects/listobject.c | 12 ------------ Python-2.7.13/Objects/longobject.c | 4 ---- Python-2.7.13/Objects/rangeobject.c | 8 -------- Python-2.7.13/Objects/setobject.c | 4 ---- Python-2.7.13/Objects/sliceobject.c | 4 ---- Python-2.7.13/Objects/stringobject.c | 4 ---- Python-2.7.13/Objects/structseq.c | 4 ---- Python-2.7.13/Objects/tupleobject.c | 8 -------- Python-2.7.13/Objects/weakrefobject.c | 4 ---- Python-2.7.13/Python/_warnings.c | 4 ---- Python-2.7.13/Python/import.c | 8 -------- Python-2.7.13/Python/marshal.c | 4 ---- 33 files changed, 168 deletions(-) diff --git a/Python-2.7.13/Modules/_codecsmodule.c b/Python-2.7.13/Modules/_codecsmodule.c index 23051fd145..11d7cd0ad5 100644 --- a/Python-2.7.13/Modules/_codecsmodule.c +++ b/Python-2.7.13/Modules/_codecsmodule.c @@ -1052,9 +1052,6 @@ static PyObject *lookup_error(PyObject *self, PyObject *args) /* --- Module API --------------------------------------------------------- */ -#ifdef OVM_MAIN -#include "Python-2.7.13/Modules/_codecsmodule.c/_codecs_functions.def" -#else static PyMethodDef _codecs_functions[] = { {"register", codec_register, METH_O, register__doc__}, @@ -1111,7 +1108,6 @@ static PyMethodDef _codecs_functions[] = { lookup_error__doc__}, {NULL, NULL} /* sentinel */ }; -#endif PyMODINIT_FUNC init_codecs(void) diff --git a/Python-2.7.13/Modules/cStringIO.c b/Python-2.7.13/Modules/cStringIO.c index 3bfbdb4c53..ce62f40646 100644 --- a/Python-2.7.13/Modules/cStringIO.c +++ b/Python-2.7.13/Modules/cStringIO.c @@ -508,9 +508,6 @@ O_writelines(Oobject *self, PyObject *args) { Py_RETURN_NONE; } -#ifdef OVM_MAIN -#include "Python-2.7.13/Modules/cStringIO.c/O_methods.def" -#else static struct PyMethodDef O_methods[] = { /* Common methods: */ {"flush", (PyCFunction)IO_flush, METH_NOARGS, IO_flush__doc__}, @@ -530,7 +527,6 @@ static struct PyMethodDef O_methods[] = { {"writelines", (PyCFunction)O_writelines, METH_O, O_writelines__doc__}, {NULL, NULL} /* sentinel */ }; -#endif static PyMemberDef O_memberlist[] = { {"softspace", T_INT, offsetof(Oobject, softspace), 0, @@ -619,9 +615,6 @@ I_close(Iobject *self, PyObject *unused) { return Py_None; } -#ifdef OVM_MAIN -#include "Python-2.7.13/Modules/cStringIO.c/I_methods.def" -#else static struct PyMethodDef I_methods[] = { /* Common methods: */ {"flush", (PyCFunction)IO_flush, METH_NOARGS, IO_flush__doc__}, @@ -639,7 +632,6 @@ static struct PyMethodDef I_methods[] = { {"close", (PyCFunction)I_close, METH_NOARGS, O_close__doc__}, {NULL, NULL} }; -#endif static void I_dealloc(Iobject *self) { @@ -732,15 +724,11 @@ IO_StringIO(PyObject *self, PyObject *args) { /* List of methods defined in the module */ -#ifdef OVM_MAIN -#include "Python-2.7.13/Modules/cStringIO.c/IO_methods.def" -#else static struct PyMethodDef IO_methods[] = { {"StringIO", (PyCFunction)IO_StringIO, METH_VARARGS, IO_StringIO__doc__}, {NULL, NULL} /* sentinel */ }; -#endif /* Initialization function for the module (*must* be called initcStringIO) */ diff --git a/Python-2.7.13/Modules/errnomodule.c b/Python-2.7.13/Modules/errnomodule.c index 52db104654..87ebab013a 100644 --- a/Python-2.7.13/Modules/errnomodule.c +++ b/Python-2.7.13/Modules/errnomodule.c @@ -12,13 +12,9 @@ * Pull in the system error definitions */ -#ifdef OVM_MAIN -#include "Python-2.7.13/Modules/errnomodule.c/errno_methods.def" -#else static PyMethodDef errno_methods[] = { {NULL, NULL} }; -#endif /* Helper function doing the dictionary inserting */ diff --git a/Python-2.7.13/Modules/fcntlmodule.c b/Python-2.7.13/Modules/fcntlmodule.c index 78a0c199e1..988d942bf8 100644 --- a/Python-2.7.13/Modules/fcntlmodule.c +++ b/Python-2.7.13/Modules/fcntlmodule.c @@ -405,9 +405,6 @@ starts. whence is as with fileobj.seek(), specifically:\n\ /* List of functions */ -#ifdef OVM_MAIN -#include "Python-2.7.13/Modules/fcntlmodule.c/fcntl_methods.def" -#else static PyMethodDef fcntl_methods[] = { {"fcntl", fcntl_fcntl, METH_VARARGS, fcntl_doc}, {"ioctl", fcntl_ioctl, METH_VARARGS, ioctl_doc}, @@ -415,7 +412,6 @@ static PyMethodDef fcntl_methods[] = { {"lockf", fcntl_lockf, METH_VARARGS, lockf_doc}, {NULL, NULL} /* sentinel */ }; -#endif PyDoc_STRVAR(module_doc, diff --git a/Python-2.7.13/Modules/gcmodule.c b/Python-2.7.13/Modules/gcmodule.c index f65eda0fc8..25b5e89e10 100644 --- a/Python-2.7.13/Modules/gcmodule.c +++ b/Python-2.7.13/Modules/gcmodule.c @@ -1369,9 +1369,6 @@ PyDoc_STRVAR(gc__doc__, "get_referrers() -- Return the list of objects that refer to an object.\n" "get_referents() -- Return the list of objects that an object refers to.\n"); -#ifdef OVM_MAIN -#include "Python-2.7.13/Modules/gcmodule.c/GcMethods.def" -#else static PyMethodDef GcMethods[] = { {"enable", gc_enable, METH_NOARGS, gc_enable__doc__}, {"disable", gc_disable, METH_NOARGS, gc_disable__doc__}, @@ -1391,7 +1388,6 @@ static PyMethodDef GcMethods[] = { gc_get_referents__doc__}, {NULL, NULL} /* Sentinel */ }; -#endif #ifndef OBJECTS_ONLY PyMODINIT_FUNC diff --git a/Python-2.7.13/Modules/posixmodule.c b/Python-2.7.13/Modules/posixmodule.c index 29f36a0e25..a635f6e384 100644 --- a/Python-2.7.13/Modules/posixmodule.c +++ b/Python-2.7.13/Modules/posixmodule.c @@ -8824,9 +8824,6 @@ posix_getresgid (PyObject *self, PyObject *noargs) } #endif -#ifdef OVM_MAIN -#include "Python-2.7.13/Modules/posixmodule.c/posix_methods.def" -#else static PyMethodDef posix_methods[] = { {"access", posix_access, METH_VARARGS, posix_access__doc__}, #ifdef HAVE_TTYNAME @@ -9139,7 +9136,6 @@ static PyMethodDef posix_methods[] = { {"urandom", posix_urandom, METH_VARARGS, posix_urandom__doc__}, {NULL, NULL} /* Sentinel */ }; -#endif static int diff --git a/Python-2.7.13/Modules/pwdmodule.c b/Python-2.7.13/Modules/pwdmodule.c index d6f85d2213..c2907f6e98 100644 --- a/Python-2.7.13/Modules/pwdmodule.c +++ b/Python-2.7.13/Modules/pwdmodule.c @@ -178,9 +178,6 @@ pwd_getpwall(PyObject *self) } #endif -#ifdef OVM_MAIN -#include "Python-2.7.13/Modules/pwdmodule.c/pwd_methods.def" -#else static PyMethodDef pwd_methods[] = { {"getpwuid", pwd_getpwuid, METH_VARARGS, pwd_getpwuid__doc__}, {"getpwnam", pwd_getpwnam, METH_VARARGS, pwd_getpwnam__doc__}, @@ -190,7 +187,6 @@ static PyMethodDef pwd_methods[] = { #endif {NULL, NULL} /* sentinel */ }; -#endif PyMODINIT_FUNC initpwd(void) diff --git a/Python-2.7.13/Modules/readline.c b/Python-2.7.13/Modules/readline.c index 6c5496f49f..886002b24a 100644 --- a/Python-2.7.13/Modules/readline.c +++ b/Python-2.7.13/Modules/readline.c @@ -702,9 +702,6 @@ contents of the line buffer."); /* Table of functions exported by the module */ -#ifdef OVM_MAIN -#include "Python-2.7.13/Modules/readline.c/readline_methods.def" -#else static struct PyMethodDef readline_methods[] = { {"parse_and_bind", parse_and_bind, METH_VARARGS, doc_parse_and_bind}, {"get_line_buffer", get_line_buffer, METH_NOARGS, doc_get_line_buffer}, @@ -751,7 +748,6 @@ static struct PyMethodDef readline_methods[] = { #endif {0, 0} }; -#endif /* C function to call the Python hooks. */ diff --git a/Python-2.7.13/Modules/resource.c b/Python-2.7.13/Modules/resource.c index 71b7861d5a..8d626c22f1 100644 --- a/Python-2.7.13/Modules/resource.c +++ b/Python-2.7.13/Modules/resource.c @@ -230,9 +230,6 @@ resource_getpagesize(PyObject *self, PyObject *unused) /* List of functions */ -#ifdef OVM_MAIN -#include "Python-2.7.13/Modules/resource.c/resource_methods.def" -#else static struct PyMethodDef resource_methods[] = { {"getrusage", resource_getrusage, METH_VARARGS}, {"getrlimit", resource_getrlimit, METH_VARARGS}, @@ -240,7 +237,6 @@ static struct PyMethodDef resource_methods[] = { {"getpagesize", resource_getpagesize, METH_NOARGS}, {NULL, NULL} /* sentinel */ }; -#endif /* Module initialization */ diff --git a/Python-2.7.13/Modules/signalmodule.c b/Python-2.7.13/Modules/signalmodule.c index 142d72f7c2..1d7ba4ba48 100644 --- a/Python-2.7.13/Modules/signalmodule.c +++ b/Python-2.7.13/Modules/signalmodule.c @@ -506,9 +506,6 @@ Returns current value of given itimer."); /* List of functions defined in the module */ -#ifdef OVM_MAIN -#include "Python-2.7.13/Modules/signalmodule.c/signal_methods.def" -#else static PyMethodDef signal_methods[] = { #ifdef HAVE_ALARM {"alarm", signal_alarm, METH_VARARGS, alarm_doc}, @@ -533,7 +530,6 @@ static PyMethodDef signal_methods[] = { METH_VARARGS, default_int_handler_doc}, {NULL, NULL} /* sentinel */ }; -#endif PyDoc_STRVAR(module_doc, diff --git a/Python-2.7.13/Modules/termios.c b/Python-2.7.13/Modules/termios.c index c5eee4f26e..d71d34b61b 100644 --- a/Python-2.7.13/Modules/termios.c +++ b/Python-2.7.13/Modules/termios.c @@ -293,9 +293,6 @@ termios_tcflow(PyObject *self, PyObject *args) return Py_None; } -#ifdef OVM_MAIN -#include "Python-2.7.13/Modules/termios.c/termios_methods.def" -#else static PyMethodDef termios_methods[] = { {"tcgetattr", termios_tcgetattr, METH_VARARGS, termios_tcgetattr__doc__}, @@ -306,7 +303,6 @@ static PyMethodDef termios_methods[] = {"tcflow", termios_tcflow, METH_VARARGS, termios_tcflow__doc__}, {NULL, NULL} }; -#endif #if defined(VSWTCH) && !defined(VSWTC) diff --git a/Python-2.7.13/Modules/timemodule.c b/Python-2.7.13/Modules/timemodule.c index aa2ee6f40c..12c43b08fe 100644 --- a/Python-2.7.13/Modules/timemodule.c +++ b/Python-2.7.13/Modules/timemodule.c @@ -776,9 +776,6 @@ inittimezone(PyObject *m) { } -#ifdef OVM_MAIN -#include "Python-2.7.13/Modules/timemodule.c/time_methods.def" -#else static PyMethodDef time_methods[] = { {"time", time_time, METH_NOARGS, time_doc}, #ifdef HAVE_CLOCK @@ -801,7 +798,6 @@ static PyMethodDef time_methods[] = { #endif {NULL, NULL} /* sentinel */ }; -#endif PyDoc_STRVAR(module_doc, diff --git a/Python-2.7.13/Modules/zipimport.c b/Python-2.7.13/Modules/zipimport.c index f823e1f64a..549a51ec55 100644 --- a/Python-2.7.13/Modules/zipimport.c +++ b/Python-2.7.13/Modules/zipimport.c @@ -561,9 +561,6 @@ PyDoc_STRVAR(doc_get_filename, \n\ Return the filename for the specified module."); -#ifdef OVM_MAIN -#include "Python-2.7.13/Modules/zipimport.c/zipimporter_methods.def" -#else static PyMethodDef zipimporter_methods[] = { {"find_module", zipimporter_find_module, METH_VARARGS, doc_find_module}, @@ -581,7 +578,6 @@ static PyMethodDef zipimporter_methods[] = { doc_is_package}, {NULL, NULL} /* sentinel */ }; -#endif static PyMemberDef zipimporter_members[] = { {"archive", T_OBJECT, offsetof(ZipImporter, archive), READONLY}, diff --git a/Python-2.7.13/Objects/enumobject.c b/Python-2.7.13/Objects/enumobject.c index c49f358e1f..1ef381f391 100644 --- a/Python-2.7.13/Objects/enumobject.c +++ b/Python-2.7.13/Objects/enumobject.c @@ -331,14 +331,10 @@ reversed_len(reversedobject *ro) PyDoc_STRVAR(length_hint_doc, "Private method returning an estimate of len(list(it))."); -#ifdef OVM_MAIN -#include "Python-2.7.13/Objects/enumobject.c/reversediter_methods.def" -#else static PyMethodDef reversediter_methods[] = { {"__length_hint__", (PyCFunction)reversed_len, METH_NOARGS, length_hint_doc}, {NULL, NULL} /* sentinel */ }; -#endif PyTypeObject PyReversed_Type = { PyVarObject_HEAD_INIT(&PyType_Type, 0) diff --git a/Python-2.7.13/Objects/exceptions.c b/Python-2.7.13/Objects/exceptions.c index 6d6d352802..f1aae5df4d 100644 --- a/Python-2.7.13/Objects/exceptions.c +++ b/Python-2.7.13/Objects/exceptions.c @@ -212,9 +212,6 @@ BaseException_setstate(PyObject *self, PyObject *state) } -#ifdef OVM_MAIN -#include "Python-2.7.13/Objects/exceptions.c/BaseException_methods.def" -#else static PyMethodDef BaseException_methods[] = { {"__reduce__", (PyCFunction)BaseException_reduce, METH_NOARGS }, {"__setstate__", (PyCFunction)BaseException_setstate, METH_O }, @@ -223,7 +220,6 @@ static PyMethodDef BaseException_methods[] = { #endif {NULL, NULL, 0, NULL}, }; -#endif @@ -796,14 +792,10 @@ EnvironmentError_reduce(PyEnvironmentErrorObject *self) } -#ifdef OVM_MAIN -#include "Python-2.7.13/Objects/exceptions.c/EnvironmentError_methods.def" -#else static PyMethodDef EnvironmentError_methods[] = { {"__reduce__", (PyCFunction)EnvironmentError_reduce, METH_NOARGS}, {NULL} }; -#endif ComplexExtendsException(PyExc_StandardError, EnvironmentError, EnvironmentError, EnvironmentError_dealloc, @@ -2044,14 +2036,10 @@ PyObject *PyExc_MemoryErrorInst=NULL; PyObject *PyExc_RecursionErrorInst = NULL; /* module global functions */ -#ifdef OVM_MAIN -#include "Python-2.7.13/Objects/exceptions.c/functions.def" -#else static PyMethodDef functions[] = { /* Sentinel */ {NULL, NULL} }; -#endif #define PRE_INIT(TYPE) if (PyType_Ready(&_PyExc_ ## TYPE) < 0) \ Py_FatalError("exceptions bootstrapping error."); diff --git a/Python-2.7.13/Objects/fileobject.c b/Python-2.7.13/Objects/fileobject.c index 660db8f917..a7d64ba16d 100644 --- a/Python-2.7.13/Objects/fileobject.c +++ b/Python-2.7.13/Objects/fileobject.c @@ -2113,9 +2113,6 @@ PyDoc_STRVAR(enter_doc, PyDoc_STRVAR(exit_doc, "__exit__(*excinfo) -> None. Closes the file."); -#ifdef OVM_MAIN -#include "Python-2.7.13/Objects/fileobject.c/file_methods.def" -#else static PyMethodDef file_methods[] = { {"readline", (PyCFunction)file_readline, METH_VARARGS, readline_doc}, {"read", (PyCFunction)file_read, METH_VARARGS, read_doc}, @@ -2137,7 +2134,6 @@ static PyMethodDef file_methods[] = { {"__exit__", (PyCFunction)file_exit, METH_VARARGS, exit_doc}, {NULL, NULL} /* sentinel */ }; -#endif #define OFF(x) offsetof(PyFileObject, x) diff --git a/Python-2.7.13/Objects/floatobject.c b/Python-2.7.13/Objects/floatobject.c index fa6cdcac1b..de0bbec821 100644 --- a/Python-2.7.13/Objects/floatobject.c +++ b/Python-2.7.13/Objects/floatobject.c @@ -2031,9 +2031,6 @@ PyDoc_STRVAR(float__format__doc, #endif -#ifdef OVM_MAIN -#include "Python-2.7.13/Objects/floatobject.c/float_methods.def" -#else static PyMethodDef float_methods[] = { {"conjugate", (PyCFunction)float_float, METH_NOARGS, "Return self, the complex conjugate of any float."}, @@ -2066,7 +2063,6 @@ static PyMethodDef float_methods[] = { #endif {NULL, NULL} /* sentinel */ }; -#endif static PyGetSetDef float_getset[] = { {"real", diff --git a/Python-2.7.13/Objects/frameobject.c b/Python-2.7.13/Objects/frameobject.c index 16df467b91..2c8fb01749 100644 --- a/Python-2.7.13/Objects/frameobject.c +++ b/Python-2.7.13/Objects/frameobject.c @@ -567,15 +567,11 @@ frame_sizeof(PyFrameObject *f) PyDoc_STRVAR(sizeof__doc__, "F.__sizeof__() -> size of F in memory, in bytes"); -#ifdef OVM_MAIN -#include "Python-2.7.13/Objects/frameobject.c/frame_methods.def" -#else static PyMethodDef frame_methods[] = { {"__sizeof__", (PyCFunction)frame_sizeof, METH_NOARGS, sizeof__doc__}, {NULL, NULL} /* sentinel */ }; -#endif PyTypeObject PyFrame_Type = { PyVarObject_HEAD_INIT(&PyType_Type, 0) diff --git a/Python-2.7.13/Objects/genobject.c b/Python-2.7.13/Objects/genobject.c index 33057947d3..082e03c48e 100644 --- a/Python-2.7.13/Objects/genobject.c +++ b/Python-2.7.13/Objects/genobject.c @@ -321,16 +321,12 @@ static PyMemberDef gen_memberlist[] = { {NULL} /* Sentinel */ }; -#ifdef OVM_MAIN -#include "Python-2.7.13/Objects/genobject.c/gen_methods.def" -#else static PyMethodDef gen_methods[] = { {"send",(PyCFunction)gen_send, METH_O, send_doc}, {"throw",(PyCFunction)gen_throw, METH_VARARGS, throw_doc}, {"close",(PyCFunction)gen_close, METH_NOARGS, close_doc}, {NULL, NULL} /* Sentinel */ }; -#endif PyTypeObject PyGen_Type = { PyVarObject_HEAD_INIT(&PyType_Type, 0) diff --git a/Python-2.7.13/Objects/intobject.c b/Python-2.7.13/Objects/intobject.c index bfbc002139..110f505962 100644 --- a/Python-2.7.13/Objects/intobject.c +++ b/Python-2.7.13/Objects/intobject.c @@ -1312,9 +1312,6 @@ int_is_finite(PyObject *v) } #endif -#ifdef OVM_MAIN -#include "Python-2.7.13/Objects/intobject.c/int_methods.def" -#else static PyMethodDef int_methods[] = { {"conjugate", (PyCFunction)int_int, METH_NOARGS, "Returns self, the complex conjugate of any int."}, @@ -1332,7 +1329,6 @@ static PyMethodDef int_methods[] = { #endif {NULL, NULL} /* sentinel */ }; -#endif static PyGetSetDef int_getset[] = { {"real", diff --git a/Python-2.7.13/Objects/iterobject.c b/Python-2.7.13/Objects/iterobject.c index 7a9ff21d6e..346d2d97a9 100644 --- a/Python-2.7.13/Objects/iterobject.c +++ b/Python-2.7.13/Objects/iterobject.c @@ -93,14 +93,10 @@ iter_len(seqiterobject *it) PyDoc_STRVAR(length_hint_doc, "Private method returning an estimate of len(list(it))."); -#ifdef OVM_MAIN -#include "Python-2.7.13/Objects/iterobject.c/seqiter_methods.def" -#else static PyMethodDef seqiter_methods[] = { {"__length_hint__", (PyCFunction)iter_len, METH_NOARGS, length_hint_doc}, {NULL, NULL} /* sentinel */ }; -#endif PyTypeObject PySeqIter_Type = { PyVarObject_HEAD_INIT(&PyType_Type, 0) diff --git a/Python-2.7.13/Objects/listobject.c b/Python-2.7.13/Objects/listobject.c index 14db49b8e1..8ee86c6413 100644 --- a/Python-2.7.13/Objects/listobject.c +++ b/Python-2.7.13/Objects/listobject.c @@ -2510,9 +2510,6 @@ cmp(x, y) -> -1, 0, 1"); static PyObject *list_subscript(PyListObject*, PyObject*); -#ifdef OVM_MAIN -#include "Python-2.7.13/Objects/listobject.c/list_methods.def" -#else static PyMethodDef list_methods[] = { {"__getitem__", (PyCFunction)list_subscript, METH_O|METH_COEXIST, getitem_doc}, {"__reversed__",(PyCFunction)list_reversed, METH_NOARGS, reversed_doc}, @@ -2528,7 +2525,6 @@ static PyMethodDef list_methods[] = { {"sort", (PyCFunction)listsort, METH_VARARGS | METH_KEYWORDS, sort_doc}, {NULL, NULL} /* sentinel */ }; -#endif static PySequenceMethods list_as_sequence = { (lenfunc)list_length, /* sq_length */ @@ -2830,14 +2826,10 @@ static PyObject *listiter_len(listiterobject *); PyDoc_STRVAR(length_hint_doc, "Private method returning an estimate of len(list(it))."); -#ifdef OVM_MAIN -#include "Python-2.7.13/Objects/listobject.c/listiter_methods.def" -#else static PyMethodDef listiter_methods[] = { {"__length_hint__", (PyCFunction)listiter_len, METH_NOARGS, length_hint_doc}, {NULL, NULL} /* sentinel */ }; -#endif PyTypeObject PyListIter_Type = { PyVarObject_HEAD_INIT(&PyType_Type, 0) @@ -2956,14 +2948,10 @@ static int listreviter_traverse(listreviterobject *, visitproc, void *); static PyObject *listreviter_next(listreviterobject *); static PyObject *listreviter_len(listreviterobject *); -#ifdef OVM_MAIN -#include "Python-2.7.13/Objects/listobject.c/listreviter_methods.def" -#else static PyMethodDef listreviter_methods[] = { {"__length_hint__", (PyCFunction)listreviter_len, METH_NOARGS, length_hint_doc}, {NULL, NULL} /* sentinel */ }; -#endif PyTypeObject PyListRevIter_Type = { PyVarObject_HEAD_INIT(&PyType_Type, 0) diff --git a/Python-2.7.13/Objects/longobject.c b/Python-2.7.13/Objects/longobject.c index ff2f3aa0fd..0677d623cf 100644 --- a/Python-2.7.13/Objects/longobject.c +++ b/Python-2.7.13/Objects/longobject.c @@ -4224,9 +4224,6 @@ long_is_finite(PyObject *v) } #endif -#ifdef OVM_MAIN -#include "Python-2.7.13/Objects/longobject.c/long_methods.def" -#else static PyMethodDef long_methods[] = { {"conjugate", (PyCFunction)long_long, METH_NOARGS, "Returns self, the complex conjugate of any long."}, @@ -4246,7 +4243,6 @@ static PyMethodDef long_methods[] = { "Returns size in memory, in bytes"}, {NULL, NULL} /* sentinel */ }; -#endif static PyGetSetDef long_getset[] = { {"real", diff --git a/Python-2.7.13/Objects/rangeobject.c b/Python-2.7.13/Objects/rangeobject.c index 4859ab6216..baa8deebe8 100644 --- a/Python-2.7.13/Objects/rangeobject.c +++ b/Python-2.7.13/Objects/rangeobject.c @@ -176,15 +176,11 @@ static PyObject * range_reverse(PyObject *seq); PyDoc_STRVAR(reverse_doc, "Returns a reverse iterator."); -#ifdef OVM_MAIN -#include "Python-2.7.13/Objects/rangeobject.c/range_methods.def" -#else static PyMethodDef range_methods[] = { {"__reversed__", (PyCFunction)range_reverse, METH_NOARGS, reverse_doc}, {"__reduce__", (PyCFunction)range_reduce, METH_VARARGS}, {NULL, NULL} /* sentinel */ }; -#endif PyTypeObject PyRange_Type = { PyObject_HEAD_INIT(&PyType_Type) @@ -254,14 +250,10 @@ rangeiter_len(rangeiterobject *r) PyDoc_STRVAR(length_hint_doc, "Private method returning an estimate of len(list(it))."); -#ifdef OVM_MAIN -#include "Python-2.7.13/Objects/rangeobject.c/rangeiter_methods.def" -#else static PyMethodDef rangeiter_methods[] = { {"__length_hint__", (PyCFunction)rangeiter_len, METH_NOARGS, length_hint_doc}, {NULL, NULL} /* sentinel */ }; -#endif static PyTypeObject Pyrangeiter_Type = { PyObject_HEAD_INIT(&PyType_Type) diff --git a/Python-2.7.13/Objects/setobject.c b/Python-2.7.13/Objects/setobject.c index 8bdc6b0d9b..b3ca643c4f 100644 --- a/Python-2.7.13/Objects/setobject.c +++ b/Python-2.7.13/Objects/setobject.c @@ -2165,9 +2165,6 @@ PyTypeObject PySet_Type = { /* frozenset object ********************************************************/ -#ifdef OVM_MAIN -#include "Python-2.7.13/Objects/setobject.c/frozenset_methods.def" -#else static PyMethodDef frozenset_methods[] = { {"__contains__",(PyCFunction)set_direct_contains, METH_O | METH_COEXIST, contains_doc}, @@ -2193,7 +2190,6 @@ static PyMethodDef frozenset_methods[] = { union_doc}, {NULL, NULL} /* sentinel */ }; -#endif static PyNumberMethods frozenset_as_number = { 0, /*nb_add*/ diff --git a/Python-2.7.13/Objects/sliceobject.c b/Python-2.7.13/Objects/sliceobject.c index fc2b1f9116..3c996f9672 100644 --- a/Python-2.7.13/Objects/sliceobject.c +++ b/Python-2.7.13/Objects/sliceobject.c @@ -286,9 +286,6 @@ slice_reduce(PySliceObject* self) PyDoc_STRVAR(reduce_doc, "Return state information for pickling."); -#ifdef OVM_MAIN -#include "Python-2.7.13/Objects/sliceobject.c/slice_methods.def" -#else static PyMethodDef slice_methods[] = { {"indices", (PyCFunction)slice_indices, METH_O, slice_indices_doc}, @@ -296,7 +293,6 @@ static PyMethodDef slice_methods[] = { METH_NOARGS, reduce_doc}, {NULL, NULL} }; -#endif static int slice_compare(PySliceObject *v, PySliceObject *w) diff --git a/Python-2.7.13/Objects/stringobject.c b/Python-2.7.13/Objects/stringobject.c index 56c616f671..d1138be7db 100644 --- a/Python-2.7.13/Objects/stringobject.c +++ b/Python-2.7.13/Objects/stringobject.c @@ -3644,9 +3644,6 @@ Return a formatted version of S as described by format_spec."); #endif -#ifdef OVM_MAIN -#include "Python-2.7.13/Objects/stringobject.c/string_methods.def" -#else static PyMethodDef string_methods[] = { /* Counterparts of the obsolete stropmodule functions; except string.maketrans(). */ @@ -3708,7 +3705,6 @@ static PyMethodDef string_methods[] = { {"__getnewargs__", (PyCFunction)string_getnewargs, METH_NOARGS}, {NULL, NULL} /* sentinel */ }; -#endif static PyObject * str_subtype_new(PyTypeObject *type, PyObject *args, PyObject *kwds); diff --git a/Python-2.7.13/Objects/structseq.c b/Python-2.7.13/Objects/structseq.c index 0a754cec55..75c1ffb0fa 100644 --- a/Python-2.7.13/Objects/structseq.c +++ b/Python-2.7.13/Objects/structseq.c @@ -426,15 +426,11 @@ static PyMappingMethods structseq_as_mapping = { (binaryfunc)structseq_subscript, }; -#ifdef OVM_MAIN -#include "Python-2.7.13/Objects/structseq.c/structseq_methods.def" -#else static PyMethodDef structseq_methods[] = { {"__reduce__", (PyCFunction)structseq_reduce, METH_NOARGS, NULL}, {NULL, NULL} }; -#endif static PyTypeObject _struct_sequence_template = { PyVarObject_HEAD_INIT(&PyType_Type, 0) diff --git a/Python-2.7.13/Objects/tupleobject.c b/Python-2.7.13/Objects/tupleobject.c index 6eb3cc2e6e..ff12608081 100644 --- a/Python-2.7.13/Objects/tupleobject.c +++ b/Python-2.7.13/Objects/tupleobject.c @@ -773,16 +773,12 @@ PyDoc_STRVAR(index_doc, PyDoc_STRVAR(count_doc, "T.count(value) -> integer -- return number of occurrences of value"); -#ifdef OVM_MAIN -#include "Python-2.7.13/Objects/tupleobject.c/tuple_methods.def" -#else static PyMethodDef tuple_methods[] = { {"__getnewargs__", (PyCFunction)tuple_getnewargs, METH_NOARGS}, {"index", (PyCFunction)tupleindex, METH_VARARGS, index_doc}, {"count", (PyCFunction)tuplecount, METH_O, count_doc}, {NULL, NULL} /* sentinel */ }; -#endif static PyMappingMethods tuple_as_mapping = { (lenfunc)tuplelength, @@ -991,14 +987,10 @@ tupleiter_len(tupleiterobject *it) PyDoc_STRVAR(length_hint_doc, "Private method returning an estimate of len(list(it))."); -#ifdef OVM_MAIN -#include "Python-2.7.13/Objects/tupleobject.c/tupleiter_methods.def" -#else static PyMethodDef tupleiter_methods[] = { {"__length_hint__", (PyCFunction)tupleiter_len, METH_NOARGS, length_hint_doc}, {NULL, NULL} /* sentinel */ }; -#endif PyTypeObject PyTupleIter_Type = { PyVarObject_HEAD_INIT(&PyType_Type, 0) diff --git a/Python-2.7.13/Objects/weakrefobject.c b/Python-2.7.13/Objects/weakrefobject.c index cf39d3beb1..c8b982fcd5 100644 --- a/Python-2.7.13/Objects/weakrefobject.c +++ b/Python-2.7.13/Objects/weakrefobject.c @@ -616,14 +616,10 @@ proxy_iternext(PyWeakReference *proxy) WRAP_METHOD(proxy_unicode, "__unicode__"); -#ifdef OVM_MAIN -#include "Python-2.7.13/Objects/weakrefobject.c/proxy_methods.def" -#else static PyMethodDef proxy_methods[] = { {"__unicode__", (PyCFunction)proxy_unicode, METH_NOARGS}, {NULL, NULL} }; -#endif static PyNumberMethods proxy_as_number = { diff --git a/Python-2.7.13/Python/_warnings.c b/Python-2.7.13/Python/_warnings.c index 12b5e8a700..6dea41fc56 100644 --- a/Python-2.7.13/Python/_warnings.c +++ b/Python-2.7.13/Python/_warnings.c @@ -780,9 +780,6 @@ PyDoc_STRVAR(warn_doc, PyDoc_STRVAR(warn_explicit_doc, "Low-level inferface to warnings functionality."); -#ifdef OVM_MAIN -#include "Python-2.7.13/Python/_warnings.c/warnings_functions.def" -#else static PyMethodDef warnings_functions[] = { {"warn", (PyCFunction)warnings_warn, METH_VARARGS | METH_KEYWORDS, warn_doc}, @@ -792,7 +789,6 @@ static PyMethodDef warnings_functions[] = { /* XXX(brett.cannon): Reasonable to add formatwarning? */ {NULL, NULL} /* sentinel */ }; -#endif static PyObject * diff --git a/Python-2.7.13/Python/import.c b/Python-2.7.13/Python/import.c index 929f165664..4c763f153f 100644 --- a/Python-2.7.13/Python/import.c +++ b/Python-2.7.13/Python/import.c @@ -3326,9 +3326,6 @@ PyDoc_STRVAR(doc_release_lock, Release the interpreter's import lock.\n\ On platforms without threads, this function does nothing."); -#ifdef OVM_MAIN -#include "Python-2.7.13/Python/import.c/imp_methods.def" -#else static PyMethodDef imp_methods[] = { {"reload", imp_reload, METH_O, doc_reload}, {"find_module", imp_find_module, METH_VARARGS, doc_find_module}, @@ -3359,7 +3356,6 @@ static PyMethodDef imp_methods[] = { {"load_source", imp_load_source, METH_VARARGS}, {NULL, NULL} /* sentinel */ }; -#endif static int setint(PyObject *d, char *name, int value) @@ -3410,16 +3406,12 @@ NullImporter_find_module(NullImporter *self, PyObject *args) Py_RETURN_NONE; } -#ifdef OVM_MAIN -#include "Python-2.7.13/Python/import.c/NullImporter_methods.def" -#else static PyMethodDef NullImporter_methods[] = { {"find_module", (PyCFunction)NullImporter_find_module, METH_VARARGS, "Always return None" }, {NULL} /* Sentinel */ }; -#endif PyTypeObject PyNullImporter_Type = { diff --git a/Python-2.7.13/Python/marshal.c b/Python-2.7.13/Python/marshal.c index 30523615de..7386b17b2b 100644 --- a/Python-2.7.13/Python/marshal.c +++ b/Python-2.7.13/Python/marshal.c @@ -1374,9 +1374,6 @@ Convert the string to a value. If no valid value is found, raise\n\ EOFError, ValueError or TypeError. Extra characters in the string are\n\ ignored."); -#ifdef OVM_MAIN -#include "Python-2.7.13/Python/marshal.c/marshal_methods.def" -#else static PyMethodDef marshal_methods[] = { {"dump", marshal_dump, METH_VARARGS, dump_doc}, {"load", marshal_load, METH_O, load_doc}, @@ -1384,7 +1381,6 @@ static PyMethodDef marshal_methods[] = { {"loads", marshal_loads, METH_VARARGS, loads_doc}, {NULL, NULL} /* sentinel */ }; -#endif PyDoc_STRVAR(marshal_doc, "This module contains functions that can read and write Python values in\n\