-
-
Notifications
You must be signed in to change notification settings - Fork 30.9k
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
bpo-1635741: Port time module to multiphase initialization (PEP 489) #19107
Conversation
Modules/timemodule.c
Outdated
PyMODINIT_FUNC | ||
PyInit_time(void) | ||
static int | ||
time_exec(PyObject *m) |
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.
Use mod
or module
would be more exact than m
;)
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.
Yeah, please this PR as an opportunity to replace m with module ;-)
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.
I have an impractical idea: Making an review robot to give some suggestions of normative problem automatically ;)
@shihai1991 |
copy that, thanks ;0 |
Modules/timemodule.c
Outdated
|
||
error: | ||
Py_DECREF(m); | ||
return NULL; | ||
Py_DECREF(module); |
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.
DECREF here is wrong. Replace "goto error" with "return -1" and remove the error label.
cc @corona10
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.
I started not wanting to refactor code but looks like a good chance for more cleaning. Thanks, already changed on latest push.
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.
Ok, this time it LGTM. Thanks ;-)
https://bugs.python.org/issue1635741