Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
36242fd8
Unverified
Kaydet (Commit)
36242fd8
authored
Tem 01, 2019
tarafından
Victor Stinner
Kaydeden (comit)
GitHub
Tem 01, 2019
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
bpo-36763: Add PyConfig_SetWideStringList() (GH-14444)
üst
e21b45a8
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
29 additions
and
1 deletion
+29
-1
init_config.rst
Doc/c-api/init_config.rst
+7
-0
initconfig.h
Include/cpython/initconfig.h
+3
-0
2019-06-28-15-49-16.bpo-36763.zrmgki.rst
...EWS.d/next/C API/2019-06-28-15-49-16.bpo-36763.zrmgki.rst
+1
-0
initconfig.c
Python/initconfig.c
+18
-1
No files found.
Doc/c-api/init_config.rst
Dosyayı görüntüle @
36242fd8
...
@@ -25,6 +25,7 @@ Functions:
...
@@ -25,6 +25,7 @@ Functions:
* :c:func:`PyConfig_SetBytesArgv`
* :c:func:`PyConfig_SetBytesArgv`
* :c:func:`PyConfig_SetBytesString`
* :c:func:`PyConfig_SetBytesString`
* :c:func:`PyConfig_SetString`
* :c:func:`PyConfig_SetString`
* :c:func:`PyConfig_SetWideStringList`
* :c:func:`PyPreConfig_InitIsolatedConfig`
* :c:func:`PyPreConfig_InitIsolatedConfig`
* :c:func:`PyPreConfig_InitPythonConfig`
* :c:func:`PyPreConfig_InitPythonConfig`
* :c:func:`PyStatus_Error`
* :c:func:`PyStatus_Error`
...
@@ -368,6 +369,12 @@ PyConfig
...
@@ -368,6 +369,12 @@ PyConfig
Preinitialize Python if needed.
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)
.. c:function:: PyStatus PyConfig_Read(PyConfig *config)
Read all Python configuration.
Read all Python configuration.
...
...
Include/cpython/initconfig.h
Dosyayı görüntüle @
36242fd8
...
@@ -422,6 +422,9 @@ PyAPI_FUNC(PyStatus) PyConfig_SetBytesArgv(
...
@@ -422,6 +422,9 @@ PyAPI_FUNC(PyStatus) PyConfig_SetBytesArgv(
PyAPI_FUNC
(
PyStatus
)
PyConfig_SetArgv
(
PyConfig
*
config
,
PyAPI_FUNC
(
PyStatus
)
PyConfig_SetArgv
(
PyConfig
*
config
,
Py_ssize_t
argc
,
Py_ssize_t
argc
,
wchar_t
*
const
*
argv
);
wchar_t
*
const
*
argv
);
PyAPI_FUNC
(
PyStatus
)
PyConfig_SetWideStringList
(
PyConfig
*
config
,
PyWideStringList
*
list
,
Py_ssize_t
length
,
wchar_t
**
items
);
#ifdef __cplusplus
#ifdef __cplusplus
}
}
...
...
Misc/NEWS.d/next/C API/2019-06-28-15-49-16.bpo-36763.zrmgki.rst
0 → 100644
Dosyayı görüntüle @
36242fd8
Add :func:`PyConfig_SetWideStringList` function.
Python/initconfig.c
Dosyayı görüntüle @
36242fd8
...
@@ -732,7 +732,7 @@ _PyConfig_Copy(PyConfig *config, const PyConfig *config2)
...
@@ -732,7 +732,7 @@ _PyConfig_Copy(PyConfig *config, const PyConfig *config2)
} while (0)
} while (0)
#define COPY_WSTRLIST(LIST) \
#define COPY_WSTRLIST(LIST) \
do { \
do { \
if (_PyWideStringList_Copy(&config->LIST, &config2->LIST) < 0
) { \
if (_PyWideStringList_Copy(&config->LIST, &config2->LIST) < 0) { \
return _PyStatus_NO_MEMORY(); \
return _PyStatus_NO_MEMORY(); \
} \
} \
} while (0)
} while (0)
...
@@ -2324,6 +2324,23 @@ PyConfig_SetArgv(PyConfig *config, Py_ssize_t argc, wchar_t * const *argv)
...
@@ -2324,6 +2324,23 @@ PyConfig_SetArgv(PyConfig *config, Py_ssize_t argc, wchar_t * const *argv)
}
}
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:
/* Read the configuration into PyConfig from:
* Command line arguments
* Command line arguments
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment