Fix Python low-level static member setters.
The low-level API for setting static member variables stopped working when the fastunpack option was turned on by default. The PyMethodDef setup requires METH_O, not METH_VARARGS with fastunpack.
This commit is contained in:
parent
2bb5eeef91
commit
826f1448b8
2 changed files with 26 additions and 1 deletions
|
|
@ -2426,7 +2426,7 @@ public:
|
|||
void add_method(String *name, String *function, int kw, Node *n = 0, int funpack = 0, int num_required = -1, int num_arguments = -1) {
|
||||
String * meth_str = NewString("");
|
||||
if (!kw) {
|
||||
if (n && funpack) {
|
||||
if (funpack) {
|
||||
if (num_required == 0 && num_arguments == 0) {
|
||||
Printf(meth_str, "\t { \"%s\", %s, METH_NOARGS, ", name, function);
|
||||
} else if (num_required == 1 && num_arguments == 1) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue