Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow Python classes to inherit from pyuv types. #55

Closed
wants to merge 5 commits into from
Closed

Allow Python classes to inherit from pyuv types. #55

wants to merge 5 commits into from

Conversation

geertj
Copy link
Contributor

@geertj geertj commented Jan 11, 2013

The attached patch allows Python classes to inherit from pyuv extension types.

@@ -210,7 +210,7 @@
0, /*tp_getattro*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
Py_TPFLAGS_DEFAULT, /*tp_flags*/
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /*tp_flags*/
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Request objects are not exposed, you can't instantiate them, they are returned to you, so I don't want to make them extendable.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@@ -246,7 +246,7 @@
0, /*tp_getattro*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC, /*tp_flags*/
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_HAVE_GC, /*tp_flags*/
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since Handle is not exposed we don't need this either, do we?

@saghul
Copy link
Owner

saghul commented Jan 11, 2013

Great work, thanks! Can you double check the flags for the Handle class? Other than that this looks good to go :-)

@geertj
Copy link
Contributor Author

geertj commented Jan 11, 2013

Let me know if i got all your requests done.. Thanks!

@benoitc
Copy link
Contributor

benoitc commented Jan 12, 2013

+1

@saghul
Copy link
Owner

saghul commented Jan 12, 2013

Thanks a lot for the work @geertj, landed in b41ced5

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.

3 participants