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
313fcd41
Kaydet (Commit)
313fcd41
authored
Şub 19, 2006
tarafından
Tim Peters
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
PyEnumKey(): Stop including the trailing NUL byte
in the returned string (logic error introduced by recent patch).
üst
d9ab979f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
5 deletions
+4
-5
_winreg.c
PC/_winreg.c
+4
-5
No files found.
PC/_winreg.c
Dosyayı görüntüle @
313fcd41
...
...
@@ -832,9 +832,9 @@ Py2Reg(PyObject *value, DWORD typ, BYTE **retDataBuf, DWORD *retDataSize)
void
*
src_buf
;
PyBufferProcs
*
pb
=
value
->
ob_type
->
tp_as_buffer
;
if
(
pb
==
NULL
)
{
PyErr_Format
(
PyExc_TypeError
,
PyErr_Format
(
PyExc_TypeError
,
"Objects of type '%s' can not "
"be used as binary registry values"
,
"be used as binary registry values"
,
value
->
ob_type
->
tp_name
);
return
FALSE
;
}
...
...
@@ -1039,14 +1039,13 @@ PyEnumKey(PyObject *self, PyObject *args)
return
NULL
;
if
(
!
PyHKEY_AsHKEY
(
obKey
,
&
hKey
,
FALSE
))
return
NULL
;
Py_BEGIN_ALLOW_THREADS
rc
=
RegEnumKeyEx
(
hKey
,
index
,
tmpbuf
,
&
len
,
NULL
,
NULL
,
NULL
,
NULL
);
Py_END_ALLOW_THREADS
if
(
rc
!=
ERROR_SUCCESS
)
return
PyErr_SetFromWindowsErrWithFunction
(
rc
,
"RegEnumKeyEx"
);
++
len
;
/* include null terminator */
retStr
=
PyString_FromStringAndSize
(
tmpbuf
,
len
);
return
retStr
;
/* can be NULL */
}
...
...
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