diff options
author | Neal Norwitz <nnorwitz@gmail.com> | 2007-08-11 06:39:53 (GMT) |
---|---|---|
committer | Neal Norwitz <nnorwitz@gmail.com> | 2007-08-11 06:39:53 (GMT) |
commit | 8dfc4a9baca7b039048b6e1dab3e4eb09f7af463 (patch) | |
tree | c755a631b7c3736811c173469a63d570124fe0d4 /Tools/modulator | |
parent | 32ca442b13ecbd50e9b4a55b97ca12061ef13b5f (diff) | |
download | cpython-8dfc4a9baca7b039048b6e1dab3e4eb09f7af463.zip cpython-8dfc4a9baca7b039048b6e1dab3e4eb09f7af463.tar.gz cpython-8dfc4a9baca7b039048b6e1dab3e4eb09f7af463.tar.bz2 |
Remove support for __members__ and __methods__. There still might be
some cleanup to do on this. Particularly in Python/traceback.c with
getting rid of the getattr if possible and Demo/*metaclasses/Enum.py.
Diffstat (limited to 'Tools/modulator')
-rw-r--r-- | Tools/modulator/Templates/object_structure | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Tools/modulator/Templates/object_structure b/Tools/modulator/Templates/object_structure index 573ac8d..78daa62 100644 --- a/Tools/modulator/Templates/object_structure +++ b/Tools/modulator/Templates/object_structure @@ -5,8 +5,8 @@ #define OFF(x) offsetof(XXXXobject, x) -static struct memberlist $abbrev$_memberlist[] = { - /* XXXX Add lines like { "foo", T_INT, OFF(foo), RO } */ +static PyMemberDef $abbrev$_memberlist[] = { + /* XXXX Add lines like { "foo", T_INT, OFF(foo), READONLY } */ {NULL} /* Sentinel */ }; @@ -17,7 +17,7 @@ $abbrev$_getattr($abbrev$object *self, char *name) PyObject *rv; /* XXXX Add your own getattr code here */ - rv = PyMember_Get((char *)/*XXXX*/0, $abbrev$_memberlist, name); + rv = PyMember_GetOne((char *)/*XXXX*/0, &$abbrev$_memberlist[i]); if (rv) return rv; PyErr_Clear(); @@ -33,5 +33,5 @@ $abbrev$_setattr($abbrev$object *self, char *name, PyObject *v) PyErr_SetString(PyExc_AttributeError, "Cannot delete attribute"); return -1; } - return PyMember_Set((char *)/*XXXX*/0, $abbrev$_memberlist, name, v); + return PyMember_SetOne((char *)/*XXXX*/0, &$abbrev$_memberlist[i], v); } |