mirror of
https://github.com/python/cpython.git
synced 2026-01-06 15:32:22 +00:00
gh-108512: Add and use new replacements for PySys_GetObject() (GH-111035)
Add functions PySys_GetAttr(), PySys_GetAttrString(), PySys_GetOptionalAttr() and PySys_GetOptionalAttrString().
This commit is contained in:
parent
b265a7ddeb
commit
bac3fcba5b
32 changed files with 287 additions and 93 deletions
|
|
@ -56,7 +56,6 @@ Revision history:
|
|||
|
||||
#include "Python.h"
|
||||
#include "osdefs.h" // SEP
|
||||
#include "pycore_sysmodule.h" // _PySys_GetOptionalAttrString()
|
||||
|
||||
#include <syslog.h>
|
||||
|
||||
|
|
@ -92,7 +91,7 @@ syslog_get_argv(void)
|
|||
Py_ssize_t slash;
|
||||
PyObject *argv;
|
||||
|
||||
if (_PySys_GetOptionalAttrString("argv", &argv) <= 0) {
|
||||
if (PySys_GetOptionalAttrString("argv", &argv) <= 0) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue