diff options
author | Victor Stinner <vstinner@redhat.com> | 2019-05-17 22:38:16 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-17 22:38:16 (GMT) |
commit | b594784272d4907b1c40d3c40d17cb081aa9cf9b (patch) | |
tree | a77fe9da72b2879fdd82858160d9b6dbdc67f057 /Include | |
parent | 4fa7504ee3184cff064e23fe6799e717ed0f9357 (diff) | |
download | cpython-b594784272d4907b1c40d3c40d17cb081aa9cf9b.zip cpython-b594784272d4907b1c40d3c40d17cb081aa9cf9b.tar.gz cpython-b594784272d4907b1c40d3c40d17cb081aa9cf9b.tar.bz2 |
bpo-36763: _Py_InitializeFromArgs() argc becomes Py_ssize_t (GH-13396)
* The type of initlization function 'argc' parameters becomes
Py_ssize_t, instead of int.
* Change _PyPreConfig_Copy() return type to void, instead of int.
The function cannot fail anymore.
* Fix compilation warnings on Windows.
Diffstat (limited to 'Include')
-rw-r--r-- | Include/cpython/pylifecycle.h | 8 | ||||
-rw-r--r-- | Include/internal/pycore_coreconfig.h | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/Include/cpython/pylifecycle.h b/Include/cpython/pylifecycle.h index a3ab6c9..8fc809d3 100644 --- a/Include/cpython/pylifecycle.h +++ b/Include/cpython/pylifecycle.h @@ -18,11 +18,11 @@ PyAPI_FUNC(_PyInitError) _Py_PreInitialize( const _PyPreConfig *src_config); PyAPI_FUNC(_PyInitError) _Py_PreInitializeFromArgs( const _PyPreConfig *src_config, - int argc, + Py_ssize_t argc, char **argv); PyAPI_FUNC(_PyInitError) _Py_PreInitializeFromWideArgs( const _PyPreConfig *src_config, - int argc, + Py_ssize_t argc, wchar_t **argv); PyAPI_FUNC(int) _Py_IsCoreInitialized(void); @@ -34,11 +34,11 @@ PyAPI_FUNC(_PyInitError) _Py_InitializeFromConfig( const _PyCoreConfig *config); PyAPI_FUNC(_PyInitError) _Py_InitializeFromArgs( const _PyCoreConfig *config, - int argc, + Py_ssize_t argc, char **argv); PyAPI_FUNC(_PyInitError) _Py_InitializeFromWideArgs( const _PyCoreConfig *config, - int argc, + Py_ssize_t argc, wchar_t **argv); PyAPI_FUNC(_PyInitError) _Py_InitializeMain(void); diff --git a/Include/internal/pycore_coreconfig.h b/Include/internal/pycore_coreconfig.h index 80aec21..ea4418f 100644 --- a/Include/internal/pycore_coreconfig.h +++ b/Include/internal/pycore_coreconfig.h @@ -61,7 +61,7 @@ PyAPI_FUNC(int) _PyWstrList_Extend(_PyWstrList *list, /* --- _PyArgv ---------------------------------------------------- */ typedef struct { - int argc; + Py_ssize_t argc; int use_bytes_argv; char **bytes_argv; wchar_t **wchar_argv; @@ -123,7 +123,7 @@ PyAPI_FUNC(_PyInitError) _PyPreCmdline_Read(_PyPreCmdline *cmdline, PyAPI_FUNC(void) _PyPreConfig_Init(_PyPreConfig *config); PyAPI_FUNC(void) _PyPreConfig_InitPythonConfig(_PyPreConfig *config); PyAPI_FUNC(void) _PyPreConfig_InitIsolatedConfig(_PyPreConfig *config); -PyAPI_FUNC(int) _PyPreConfig_Copy(_PyPreConfig *config, +PyAPI_FUNC(void) _PyPreConfig_Copy(_PyPreConfig *config, const _PyPreConfig *config2); PyAPI_FUNC(PyObject*) _PyPreConfig_AsDict(const _PyPreConfig *config); PyAPI_FUNC(void) _PyPreConfig_GetCoreConfig(_PyPreConfig *config, @@ -158,10 +158,10 @@ PyAPI_FUNC(_PyInitError) _PyCoreConfig_SetPyArgv( const _PyArgv *args); PyAPI_FUNC(_PyInitError) _PyCoreConfig_SetArgv( _PyCoreConfig *config, - int argc, + Py_ssize_t argc, char **argv); PyAPI_FUNC(_PyInitError) _PyCoreConfig_SetWideArgv(_PyCoreConfig *config, - int argc, + Py_ssize_t argc, wchar_t **argv); |