diff options
author | Ken Hughes <khughes@pacific.edu> | 2006-11-17 20:50:43 +0300 |
---|---|---|
committer | Ken Hughes <khughes@pacific.edu> | 2006-11-17 20:50:43 +0300 |
commit | 318a694a2592af3324df5b0bde2a66db67f55145 (patch) | |
tree | c636131e9268c142b16d9c6d920aec1c8194c1af /source/blender/python/api2_2x/constant.c | |
parent | 27c42ee06233e889f95ac5114f785c6b354c176f (diff) |
Get rid of various warnings with gcc under linux
Diffstat (limited to 'source/blender/python/api2_2x/constant.c')
-rw-r--r-- | source/blender/python/api2_2x/constant.c | 31 |
1 files changed, 2 insertions, 29 deletions
diff --git a/source/blender/python/api2_2x/constant.c b/source/blender/python/api2_2x/constant.c index 55b9d9c41a6..45af1f1b96d 100644 --- a/source/blender/python/api2_2x/constant.c +++ b/source/blender/python/api2_2x/constant.c @@ -113,33 +113,7 @@ static int constantAssSubscript(BPy_constant *self, PyObject *who, PyObject *car { return 0; /* no user assignments allowed */ } -//------------------------tp_getattr -static PyObject *constant_getAttr(BPy_constant * self, char *name) -{ - if(self->dict) { - PyObject *v; - - if(!strcmp(name, "__members__")) - return PyDict_Keys(self->dict); - - if(!strcmp(name, "__methods__")) { - PyObject *value = PyString_FromString ( name ); - v = PyObject_GenericGetAttr( (PyObject *)self, value ); - Py_DECREF( value); - return v; - } - - v = PyDict_GetItemString(self->dict, name); - if(v) { - return EXPP_incr_ret(v); /* was a borrowed ref */ - } - return (EXPP_ReturnPyObjError(PyExc_AttributeError, - "attribute not found")); - } - return (EXPP_ReturnPyObjError(PyExc_RuntimeError, - "constant object lacks a dictionary")); -} - +//------------------------tp_getattro static PyObject *constant_getAttro(BPy_constant * self, PyObject *value) { if(self->dict) { @@ -212,8 +186,7 @@ PyTypeObject constant_Type = { 0, //tp_itemsize (destructor)constant_dealloc, //tp_dealloc 0, //tp_print - // (getattrfunc)constant_getAttr, //tp_getattr - 0, //tp_getattr + 0, //tp_getattr 0, //tp_setattr 0, //tp_compare (reprfunc) constant_repr, //tp_repr |