diff options
author | Nathan Letwory <nathan@letworyinteractive.com> | 2008-12-30 03:35:31 +0300 |
---|---|---|
committer | Nathan Letwory <nathan@letworyinteractive.com> | 2008-12-30 03:35:31 +0300 |
commit | 11e50fb581b4abad5e5aa01a778629e4aa818fb5 (patch) | |
tree | d4ceae5d4a59e2afc5a1435d85cb993c8c48c4f4 /source | |
parent | 26290958289e8a8f3eebccbd67b5968d2dae7d96 (diff) |
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.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/python/intern/bpy_operator.c | 16 |
1 files changed, 8 insertions, 8 deletions
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) |