Message317794
> But the problem is that additional flags can be used, e.g. METH_CLASS.
Right, https://docs.python.org/3/c-api/structures.html says: "The individual flags indicate either a calling convention or a binding convention". This may be overcome by introducing another macro with 2 arguments, the second argument being used to set the binding convention flag:
#define SET_METH_VARARGS_KEYWORDS_FLAG(func, flag) \
(PyCFunction)(void *)(PyCFunctionWithKeywords)func, METH_VARARGS|METH_KEYWORDS|flag
#define SET_METH_VARARGS_KEYWORDS(func) SET_METH_VARARGS_KEYWORDS_FLAG(func, 0x0000)
The refactoring would be quite large though. |
|
Date |
User |
Action |
Args |
2018-05-27 14:27:52 | xdegaye | set | recipients:
+ xdegaye, vstinner, pmpp, martin.panter, serhiy.storchaka, ztane, eitan.adler, siddhesh, cstratak, miss-islington |
2018-05-27 14:27:52 | xdegaye | set | messageid: <1527431272.67.0.682650639539.issue33012@psf.upfronthosting.co.za> |
2018-05-27 14:27:52 | xdegaye | link | issue33012 messages |
2018-05-27 14:27:52 | xdegaye | create | |
|