Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6d20407

Browse files
committed
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.
1 parent 971e78b commit 6d20407

2 files changed

Lines changed: 246 additions & 527 deletions

File tree

Include/descrobject.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,11 @@ typedef PyObject *(*wrapperfunc)(PyObject *self, PyObject *args,
1616

1717
struct wrapperbase {
1818
char *name;
19+
int offset;
20+
void *function;
1921
wrapperfunc wrapper;
2022
char *doc;
23+
PyObject *name_strobj;
2124
};
2225

2326
/* Various kinds of descriptor objects */

0 commit comments

Comments
 (0)