consider __setstate__ as a constructor

This commit is contained in:
Wenzel Jakob 2016-05-15 23:54:13 +02:00
parent 178c8a899d
commit a380ed9259

View File

@ -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;