From 11e50fb581b4abad5e5aa01a778629e4aa818fb5 Mon Sep 17 00:00:00 2001 From: Nathan Letwory Date: Tue, 30 Dec 2008 00:35:31 +0000 Subject: 2.5 * make bpy compile with msvc again. The forward declaration of the array with no length was a problem. Instead, I switched the tables and made the function a forward declaration. --- source/blender/python/intern/bpy_operator.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'source/blender/python') diff --git a/source/blender/python/intern/bpy_operator.c b/source/blender/python/intern/bpy_operator.c index 24e44c153e2..acc4d03db50 100644 --- a/source/blender/python/intern/bpy_operator.c +++ b/source/blender/python/intern/bpy_operator.c @@ -223,7 +223,14 @@ static PyObject * pyop_func_call(BPy_OperatorFunc * self, PyObject *args, PyObje Py_RETURN_NONE; } -static struct PyMethodDef pyop_base_methods[]; +PyObject *pyop_base_dir(PyObject *self); + +static struct PyMethodDef pyop_base_methods[] = { + {"add", (PyCFunction)PYOP_wrap_add, METH_VARARGS, ""}, + {"remove", (PyCFunction)PYOP_wrap_remove, METH_VARARGS, ""}, + {"__dir__", (PyCFunction)pyop_base_dir, METH_NOARGS, ""}, + {NULL, NULL, 0, NULL} +}; PyObject *pyop_base_dir(PyObject *self) { @@ -247,13 +254,6 @@ PyObject *pyop_base_dir(PyObject *self) return ret; } -static struct PyMethodDef pyop_base_methods[] = { - {"add", (PyCFunction)PYOP_wrap_add, METH_VARARGS, ""}, - {"remove", (PyCFunction)PYOP_wrap_remove, METH_VARARGS, ""}, - {"__dir__", (PyCFunction)pyop_base_dir, METH_NOARGS, ""}, - {NULL, NULL, 0, NULL} -}; - /*-----------------------BPy_OperatorBase method def------------------------------*/ PyTypeObject pyop_base_Type = { #if (PY_VERSION_HEX >= 0x02060000) -- cgit v1.2.3