mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
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:
parent
971e78b55b
commit
6d204074cb
2 changed files with 244 additions and 525 deletions
|
@ -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 */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue