From 8dfc4a9baca7b039048b6e1dab3e4eb09f7af463 Mon Sep 17 00:00:00 2001 From: Neal Norwitz Date: Sat, 11 Aug 2007 06:39:53 +0000 Subject: 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. --- Include/structmember.h | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) (limited to 'Include/structmember.h') diff --git a/Include/structmember.h b/Include/structmember.h index b7d00b713d..10555b1a2d 100644 --- a/Include/structmember.h +++ b/Include/structmember.h @@ -19,20 +19,12 @@ extern "C" { #define offsetof(type, member) ( (int) & ((type*)0) -> member ) #endif -/* An array of memberlist structures defines the name, type and offset +/* An array of PyMemberDef structures defines the name, type and offset of selected members of a C structure. These can be read by - PyMember_Get() and set by PyMember_Set() (except if their READONLY flag - is set). The array must be terminated with an entry whose name + PyMember_GetOne() and set by PyMember_SetOne() (except if their READONLY + flag is set). The array must be terminated with an entry whose name pointer is NULL. */ -struct memberlist { - /* Obsolete version, for binary backwards compatibility */ - char *name; - int type; - int offset; - int flags; -}; - typedef struct PyMemberDef { /* Current version, use this */ char *name; @@ -76,16 +68,11 @@ typedef struct PyMemberDef { /* Flags */ #define READONLY 1 -#define RO READONLY /* Shorthand */ #define READ_RESTRICTED 2 #define WRITE_RESTRICTED 4 #define RESTRICTED (READ_RESTRICTED | WRITE_RESTRICTED) -/* Obsolete API, for binary backwards compatibility */ -PyAPI_FUNC(PyObject *) PyMember_Get(const char *, struct memberlist *, const char *); -PyAPI_FUNC(int) PyMember_Set(char *, struct memberlist *, const char *, PyObject *); - /* Current API, use this */ PyAPI_FUNC(PyObject *) PyMember_GetOne(const char *, struct PyMemberDef *); PyAPI_FUNC(int) PyMember_SetOne(char *, struct PyMemberDef *, PyObject *); -- cgit v1.2.1