-
-
Notifications
You must be signed in to change notification settings - Fork 34k
gh-144330: Initialize staticmethod/classmethod callables in tp_new #144364
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
base: main
Are you sure you want to change the base?
Conversation
|
You need to update your branch to fix the CI, it is currently incompatible. |
| cm->cm_callable = Py_NewRef(Py_None); | ||
| cm->cm_dict = NULL; | ||
| return (PyObject *)cm; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move cm_new() before PyClassMethod_Type, so you don't need to declare it in advance (remove forward declaration line 1558).
| sm->sm_callable = Py_NewRef(Py_None); | ||
| sm->sm_dict = NULL; | ||
| return (PyObject *)sm; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move sm_new() before PyStaticMethod_Type.
Co-authored-by: Victor Stinner <[email protected]>
Co-authored-by: Victor Stinner <[email protected]>
Co-authored-by: Victor Stinner <[email protected]>
Co-authored-by: Victor Stinner <[email protected]>
Co-authored-by: Victor Stinner <[email protected]>
|
@vstinner Thanks for the review, i'll update as per suggestions. |
|
You didn't move cm_new() and sm_new(). |
sorry , I mean i will update, just need some time Thanks! |
Co-authored-by: Victor Stinner <[email protected]>
#144330