mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-11 08:03:55 +00:00
consider __setstate__ as a constructor
This commit is contained in:
parent
178c8a899d
commit
a380ed9259
@ -209,7 +209,7 @@ protected:
|
|||||||
|
|
||||||
rec->signature = strdup(signature.c_str());
|
rec->signature = strdup(signature.c_str());
|
||||||
rec->args.shrink_to_fit();
|
rec->args.shrink_to_fit();
|
||||||
rec->is_constructor = !strcmp(rec->name, "__init__");
|
rec->is_constructor = !strcmp(rec->name, "__init__") || !strcmp(rec->name, "__setstate__");
|
||||||
rec->has_args = false;
|
rec->has_args = false;
|
||||||
rec->has_kwargs = false;
|
rec->has_kwargs = false;
|
||||||
rec->nargs = args;
|
rec->nargs = args;
|
||||||
|
Loading…
Reference in New Issue
Block a user