Issue #28748: Private variable _Py_PackageContext is now of type "const char *"
rather of "char *".
This commit is contained in:
parent
1fb1c998b2
commit
b57d9eac41
|
@ -176,7 +176,7 @@ PyAPI_FUNC(PyObject *) PyModule_FromDefAndSpec2(PyModuleDef *def,
|
||||||
#endif /* New in 3.5 */
|
#endif /* New in 3.5 */
|
||||||
|
|
||||||
#ifndef Py_LIMITED_API
|
#ifndef Py_LIMITED_API
|
||||||
PyAPI_DATA(char *) _Py_PackageContext;
|
PyAPI_DATA(const char *) _Py_PackageContext;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|
|
@ -416,6 +416,9 @@ Windows
|
||||||
C API
|
C API
|
||||||
-----
|
-----
|
||||||
|
|
||||||
|
- Issue #28748: Private variable _Py_PackageContext is now of type "const char *"
|
||||||
|
rather of "char *".
|
||||||
|
|
||||||
- Issue #19569: Compiler warnings are now emitted if use most of deprecated
|
- Issue #19569: Compiler warnings are now emitted if use most of deprecated
|
||||||
functions.
|
functions.
|
||||||
|
|
||||||
|
|
|
@ -188,7 +188,7 @@ PyModule_Create2(struct PyModuleDef* module, int module_api_version)
|
||||||
(if the name actually matches).
|
(if the name actually matches).
|
||||||
*/
|
*/
|
||||||
if (_Py_PackageContext != NULL) {
|
if (_Py_PackageContext != NULL) {
|
||||||
char *p = strrchr(_Py_PackageContext, '.');
|
const char *p = strrchr(_Py_PackageContext, '.');
|
||||||
if (p != NULL && strcmp(module->m_name, p+1) == 0) {
|
if (p != NULL && strcmp(module->m_name, p+1) == 0) {
|
||||||
name = _Py_PackageContext;
|
name = _Py_PackageContext;
|
||||||
_Py_PackageContext = NULL;
|
_Py_PackageContext = NULL;
|
||||||
|
|
|
@ -94,7 +94,7 @@ _PyImport_LoadDynamicModuleWithSpec(PyObject *spec, FILE *fp)
|
||||||
#endif
|
#endif
|
||||||
PyObject *name_unicode = NULL, *name = NULL, *path = NULL, *m = NULL;
|
PyObject *name_unicode = NULL, *name = NULL, *path = NULL, *m = NULL;
|
||||||
const char *name_buf, *hook_prefix;
|
const char *name_buf, *hook_prefix;
|
||||||
char *oldcontext;
|
const char *oldcontext;
|
||||||
dl_funcptr exportfunc;
|
dl_funcptr exportfunc;
|
||||||
PyModuleDef *def;
|
PyModuleDef *def;
|
||||||
PyObject *(*p0)(void);
|
PyObject *(*p0)(void);
|
||||||
|
|
|
@ -9,7 +9,7 @@ typedef double va_double;
|
||||||
static PyObject *va_build_value(const char *, va_list, int);
|
static PyObject *va_build_value(const char *, va_list, int);
|
||||||
|
|
||||||
/* Package context -- the full module name for package imports */
|
/* Package context -- the full module name for package imports */
|
||||||
char *_Py_PackageContext = NULL;
|
const char *_Py_PackageContext = NULL;
|
||||||
|
|
||||||
/* Helper for mkvalue() to scan the length of a format */
|
/* Helper for mkvalue() to scan the length of a format */
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue