summaryrefslogtreecommitdiffstats
path: root/Include/structmember.h
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 /Include/structmember.h
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 'Include/structmember.h')
-rw-r--r--Include/structmember.h19
1 files changed, 3 insertions, 16 deletions
diff --git a/Include/structmember.h b/Include/structmember.h
index b7d00b7..10555b1 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 *);