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.
This commit is contained in:
Guido van Rossum 2001-10-21 00:44:31 +00:00
parent 971e78b55b
commit 6d204074cb
2 changed files with 244 additions and 525 deletions

View file

@ -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 */