8000 bpo-1635741: Port resource extension module to multiphase initialization(PEP 489) by shihai1991 · Pull Request #19252 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

bpo-1635741: Port resource extension module to multiphase initialization(PEP 489) #19252

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

Merged
merged 8 commits into from
Apr 2, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
move position of claim of v
  • Loading branch information
shihai1991 committed Apr 2, 2020
commit 41d6bf83c49e8c7a49082f751d1eb2535f221216
4 changes: 2 additions & 2 deletions Modules/resource.c
Original file line number Diff line number Diff line change
Expand Up @@ -349,8 +349,6 @@ static int resource_exec(PyObject *module)
} \
} while (0)

PyObject *v;

/* Add some symbolic constants to the module */
Py_INCREF(PyExc_OSError);
if (PyModule_AddObject(module, "error", PyExc_OSError) < 0) {
Expand Down Expand Up @@ -472,6 +470,8 @@ static int resource_exec(PyObject *module)
ADD_INT(module, RLIMIT_NPTS);
#endif

PyObject *v;

if (sizeof(RLIM_INFINITY) > sizeof(long)) {
v = PyLong_FromLongLong((long long) RLIM_INFINITY);
} else
Expand Down
0