Skip to content

Fix dynamic attribute inheritance in C++#444

Merged
wjakob merged 1 commit into
pybind:masterfrom
dean0x7d:inherit-dynamic-attr
Oct 14, 2016
Merged

Fix dynamic attribute inheritance in C++#444
wjakob merged 1 commit into
pybind:masterfrom
dean0x7d:inherit-dynamic-attr

Conversation

@dean0x7d

Copy link
Copy Markdown
Member

Inheriting from a class with dynamic attributes was working fine on the Python side, but not in C++. PyType_Ready would usually perform the inheritance for us, but it can't adjust tp_basicsize appropriately. This fixes it so all C++ derived classes will inherit py::dynamic_attr.

`PyType_Ready` would usually perform the inheritance for us, but it
can't adjust `tp_basicsize` appropriately.
@wjakob

wjakob commented Oct 14, 2016

Copy link
Copy Markdown
Member

LGTM, thanks!

@wjakob
wjakob merged commit 8b51ed1 into pybind:master Oct 14, 2016
@dean0x7d
dean0x7d deleted the inherit-dynamic-attr branch October 15, 2016 16:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants