aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2001-10-21 00:44:31 +0000
committerGuido van Rossum <guido@python.org>2001-10-21 00:44:31 +0000
commit6d204074cbd72bc671d1bdbb0d462ef3f0e49910 (patch)
treee0567deaf95b61c83fd6ffa868dd8854a74bd4dc /Include/descrobject.h
parentrewrote the pattern.split method in C (diff)
downloadcpython-6d204074cbd72bc671d1bdbb0d462ef3f0e49910.tar.gz
cpython-6d204074cbd72bc671d1bdbb0d462ef3f0e49910.tar.bz2
cpython-6d204074cbd72bc671d1bdbb0d462ef3f0e49910.zip
Big internal change that should have no external effects: unify the
'slotdef' structure typedef and 'struct wrapperbase'. By adding the wrapper docstrings to the slotdef structure, the slotdefs array can serve as the data structure that drives add_operators(); the wrapper descriptor contains a pointer to slotdef structure. This replaces lots of custom code from add_operators() by a loop over the slotdefs array, and does away with all the tab_xxx tables.
Diffstat (limited to 'Include/descrobject.h')
-rw-r--r--Include/descrobject.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/Include/descrobject.h b/Include/descrobject.h
index b79c2faacc8..9a071101531 100644
--- a/Include/descrobject.h
+++ b/Include/descrobject.h
@@ -16,8 +16,11 @@ typedef PyObject *(*wrapperfunc)(PyObject *self, PyObject *args,
struct wrapperbase {
char *name;
+ int offset;
+ void *function;
wrapperfunc wrapper;
char *doc;
+ PyObject *name_strobj;
};
/* Various kinds of descriptor objects */