summaryrefslogtreecommitdiff
path: root/Include/structmember.h
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2007-08-11 06:39:53 +0000
committerNeal Norwitz <nnorwitz@gmail.com>2007-08-11 06:39:53 +0000
commit8dfc4a9baca7b039048b6e1dab3e4eb09f7af463 (patch)
treec755a631b7c3736811c173469a63d570124fe0d4 /Include/structmember.h
parent32ca442b13ecbd50e9b4a55b97ca12061ef13b5f (diff)
downloadcpython-git-8dfc4a9baca7b039048b6e1dab3e4eb09f7af463.tar.gz
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 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 *);