Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.7k
gh-108512: Add and use new replacements for PySys_GetObject()#111035
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Changes from1 commit
4d0f508eb42b392d4588d2eb95339fc2f3d65713cee6ecf118a0f5f2516829e9503aafe2857efdc26ec2104dcc2cf75fc3943465956639d8b40a66503b9c0a5d793c509869ed439bc3c93ab31b154a82a81c7605File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
- Loading branch information
Uh oh!
There was an error while loading.Please reload this page.
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -3235,15 +3235,7 @@ static PyObject * | ||
| sys_getattr(PyObject *Py_UNUSED(module), PyObject *name) | ||
| { | ||
| NULLABLE(name); | ||
| return PySys_GetAttr(name); | ||
| } | ||
| static PyObject * | ||
| @@ -3254,15 +3246,7 @@ sys_getattrstring(PyObject *Py_UNUSED(module), PyObject *arg) | ||
| if (!PyArg_Parse(arg, "z#", &name, &size)) { | ||
| return NULL; | ||
| } | ||
| return PySys_GetAttrString(name); | ||
| } | ||
| static PyObject * | ||
| @@ -3274,6 +3258,7 @@ sys_getoptionalattr(PyObject *Py_UNUSED(module), PyObject *name) | ||
| switch (PySys_GetOptionalAttr(name, &value)) { | ||
| case -1: | ||
| assert(value == NULL); | ||
| ||
| assert(PyErr_Occurred()); | ||
| return NULL; | ||
| case 0: | ||
| assert(value == NULL); | ||
| @@ -3282,7 +3267,6 @@ sys_getoptionalattr(PyObject *Py_UNUSED(module), PyObject *name) | ||
| return value; | ||
| default: | ||
| Py_FatalError("PySys_GetOptionalAttr() returned invalid code"); | ||
| } | ||
| } | ||
| @@ -3299,6 +3283,7 @@ sys_getoptionalattrstring(PyObject *Py_UNUSED(module), PyObject *arg) | ||
| switch (PySys_GetOptionalAttrString(name, &value)) { | ||
| case -1: | ||
| assert(value == NULL); | ||
| assert(PyErr_Occurred()); | ||
| return NULL; | ||
| case 0: | ||
| assert(value == NULL); | ||
| @@ -3307,7 +3292,6 @@ sys_getoptionalattrstring(PyObject *Py_UNUSED(module), PyObject *arg) | ||
| return value; | ||
| default: | ||
| Py_FatalError("PySys_GetOptionalAttrString() returned invalid code"); | ||
| } | ||
| } | ||