* :c:func:`PyConfig_SetBytesArgv`
* :c:func:`PyConfig_SetBytesString`
* :c:func:`PyConfig_SetString`
+* :c:func:`PyConfig_SetWideStringList`
* :c:func:`PyPreConfig_InitIsolatedConfig`
* :c:func:`PyPreConfig_InitPythonConfig`
* :c:func:`PyStatus_Error`
Preinitialize Python if needed.
+ .. c:function:: PyStatus PyConfig_SetWideStringList(PyConfig *config, PyWideStringList *list, Py_ssize_t length, wchar_t **items)
+
+ Set the list of wide strings *list* to *length* and *items*.
+
+ Preinitialize Python if needed.
+
.. c:function:: PyStatus PyConfig_Read(PyConfig *config)
Read all Python configuration.
PyAPI_FUNC(PyStatus) PyConfig_SetArgv(PyConfig *config,
Py_ssize_t argc,
wchar_t * const *argv);
+PyAPI_FUNC(PyStatus) PyConfig_SetWideStringList(PyConfig *config,
+ PyWideStringList *list,
+ Py_ssize_t length, wchar_t **items);
#ifdef __cplusplus
}
--- /dev/null
+Add :func:`PyConfig_SetWideStringList` function.
} while (0)
#define COPY_WSTRLIST(LIST) \
do { \
- if (_PyWideStringList_Copy(&config->LIST, &config2->LIST) < 0 ) { \
+ if (_PyWideStringList_Copy(&config->LIST, &config2->LIST) < 0) { \
return _PyStatus_NO_MEMORY(); \
} \
} while (0)
}
+PyStatus
+PyConfig_SetWideStringList(PyConfig *config, PyWideStringList *list,
+ Py_ssize_t length, wchar_t **items)
+{
+ PyStatus status = _Py_PreInitializeFromConfig(config, NULL);
+ if (_PyStatus_EXCEPTION(status)) {
+ return status;
+ }
+
+ PyWideStringList list2 = {.length = length, .items = items};
+ if (_PyWideStringList_Copy(list, &list2) < 0) {
+ return _PyStatus_NO_MEMORY();
+ }
+ return _PyStatus_OK();
+}
+
+
/* Read the configuration into PyConfig from:
* Command line arguments