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
e6bfa291
Kaydet (Commit)
e6bfa291
authored
Ara 27, 2012
tarafından
Brian Curtin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
Merge 3.2
üst
62cf69ec
172e4229
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
2 deletions
+23
-2
test_winreg.py
Lib/test/test_winreg.py
+17
-0
NEWS
Misc/NEWS
+4
-0
winreg.c
PC/winreg.c
+2
-2
No files found.
Lib/test/test_winreg.py
Dosyayı görüntüle @
e6bfa291
...
@@ -335,6 +335,23 @@ class LocalWinregTests(BaseWinregTests):
...
@@ -335,6 +335,23 @@ class LocalWinregTests(BaseWinregTests):
finally
:
finally
:
DeleteKey
(
HKEY_CURRENT_USER
,
test_key_name
)
DeleteKey
(
HKEY_CURRENT_USER
,
test_key_name
)
def
test_queryvalueex_return_value
(
self
):
# Test for Issue #16759, return unsigned int from QueryValueEx.
# Reg2Py, which gets called by QueryValueEx, was returning a value
# generated by PyLong_FromLong. The implmentation now uses
# PyLong_FromUnsignedLong to match DWORD's size.
try
:
with
CreateKey
(
HKEY_CURRENT_USER
,
test_key_name
)
as
ck
:
self
.
assertNotEqual
(
ck
.
handle
,
0
)
test_val
=
0x80000000
SetValueEx
(
ck
,
"test_name"
,
None
,
REG_DWORD
,
test_val
)
ret_val
,
ret_type
=
QueryValueEx
(
ck
,
"test_name"
)
self
.
assertEqual
(
ret_type
,
REG_DWORD
)
self
.
assertEqual
(
ret_val
,
test_val
)
finally
:
DeleteKey
(
HKEY_CURRENT_USER
,
test_key_name
)
@unittest.skipUnless
(
REMOTE_NAME
,
"Skipping remote registry tests"
)
@unittest.skipUnless
(
REMOTE_NAME
,
"Skipping remote registry tests"
)
class
RemoteWinregTests
(
BaseWinregTests
):
class
RemoteWinregTests
(
BaseWinregTests
):
...
...
Misc/NEWS
Dosyayı görüntüle @
e6bfa291
...
@@ -12,6 +12,10 @@ What's New in Python 3.3.1?
...
@@ -12,6 +12,10 @@ What's New in Python 3.3.1?
Core and Builtins
Core and Builtins
-----------------
-----------------
- Issue #16759: Support the full DWORD (unsigned long) range in Reg2Py
when retreiving a REG_DWORD value. This corrects functions like
winreg.QueryValueEx that may have been returning truncated values.
- Issue #14420: Support the full DWORD (unsigned long) range in Py2Reg
- Issue #14420: Support the full DWORD (unsigned long) range in Py2Reg
when passed a REG_DWORD value. Fixes OverflowError in winreg.SetValueEx.
when passed a REG_DWORD value. Fixes OverflowError in winreg.SetValueEx.
...
...
PC/winreg.c
Dosyayı görüntüle @
e6bfa291
...
@@ -912,9 +912,9 @@ Reg2Py(BYTE *retDataBuf, DWORD retDataSize, DWORD typ)
...
@@ -912,9 +912,9 @@ Reg2Py(BYTE *retDataBuf, DWORD retDataSize, DWORD typ)
switch
(
typ
)
{
switch
(
typ
)
{
case
REG_DWORD
:
case
REG_DWORD
:
if
(
retDataSize
==
0
)
if
(
retDataSize
==
0
)
obData
=
PyLong_FromLong
(
0
);
obData
=
PyLong_From
Unsigned
Long
(
0
);
else
else
obData
=
PyLong_FromLong
(
*
(
int
*
)
retDataBuf
);
obData
=
PyLong_From
Unsigned
Long
(
*
(
int
*
)
retDataBuf
);
break
;
break
;
case
REG_SZ
:
case
REG_SZ
:
case
REG_EXPAND_SZ
:
case
REG_EXPAND_SZ
:
...
...
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