mirror of
https://github.com/pybind/pybind11.git
synced 2025-01-31 15:20:34 +00:00
support __bool__ on Python 2.x and 3.x
This commit is contained in:
parent
00c7d6ccc7
commit
d1bfc4e0f8
@ -200,6 +200,9 @@ protected:
|
||||
if (strcmp(rec->name, "__next__") == 0) {
|
||||
std::free(rec->name);
|
||||
rec->name = strdup("next");
|
||||
} else if (strcmp(rec->name, "__bool__") == 0) {
|
||||
std::free(rec->name);
|
||||
rec->name = strdup("__nonzero__");
|
||||
}
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user