summaryrefslogtreecommitdiffstats
path: root/PC
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2007-08-11 06:39:53 (GMT)
committerNeal Norwitz <nnorwitz@gmail.com>2007-08-11 06:39:53 (GMT)
commit8dfc4a9baca7b039048b6e1dab3e4eb09f7af463 (patch)
treec755a631b7c3736811c173469a63d570124fe0d4 /PC
parent32ca442b13ecbd50e9b4a55b97ca12061ef13b5f (diff)
downloadcpython-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 'PC')
-rw-r--r--PC/_winreg.c9
-rw-r--r--PC/os2emx/python25.def2
-rw-r--r--PC/os2vacpp/python.def2
3 files changed, 6 insertions, 7 deletions
diff --git a/PC/_winreg.c b/PC/_winreg.c
index c294653..135be32 100644
--- a/PC/_winreg.c
+++ b/PC/_winreg.c
@@ -473,8 +473,8 @@ PyTypeObject PyHKEY_Type =
#define OFF(e) offsetof(PyHKEYObject, e)
-static struct memberlist PyHKEY_memberlist[] = {
- {"handle", T_INT, OFF(hkey)},
+static PyMemberDef PyHKEY_memberlist[] = {
+ {"handle", T_INT, OFF(hkey), READONLY},
{NULL} /* Sentinel */
};
@@ -523,7 +523,10 @@ PyHKEY_getattr(PyObject *self, const char *name)
PyErr_Clear();
if (strcmp(name, "handle") == 0)
return PyLong_FromVoidPtr(((PyHKEYObject *)self)->hkey);
- return PyMember_Get((char *)self, PyHKEY_memberlist, name);
+ PyErr_Format(PyExc_AttributeError,
+ "'%.50s' object has no attribute '%.400s'",
+ Py_Type(self)->tp_name, name);
+ return NULL;
}
/************************************************************************
diff --git a/PC/os2emx/python25.def b/PC/os2emx/python25.def
index ef6bd13..6aa2e62 100644
--- a/PC/os2emx/python25.def
+++ b/PC/os2emx/python25.def
@@ -1091,10 +1091,8 @@ EXPORTS
"_Py_QnewFlag"
; From python25_s.lib(structmember)
- "PyMember_Get"
"PyMember_GetOne"
"PyMember_SetOne"
- "PyMember_Set"
; From python25_s.lib(symtable)
"PySymtable_Build"
diff --git a/PC/os2vacpp/python.def b/PC/os2vacpp/python.def
index b336445..55a17d7 100644
--- a/PC/os2vacpp/python.def
+++ b/PC/os2vacpp/python.def
@@ -244,8 +244,6 @@ EXPORTS
PyMem_Free
PyMem_Malloc
PyMem_Realloc
- PyMember_Get
- PyMember_Set
PyMethod_Class
PyMethod_Fini
PyMethod_Function