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
4482b01d
Kaydet (Commit)
4482b01d
authored
Ara 27, 2012
tarafından
Brian Curtin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
Merge 3.3
üst
6e5c8f99
62cf69ec
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
1 deletion
+16
-1
test_winreg.py
Lib/test/test_winreg.py
+12
-0
NEWS
Misc/NEWS
+3
-0
winreg.c
PC/winreg.c
+1
-1
No files found.
Lib/test/test_winreg.py
Dosyayı görüntüle @
4482b01d
...
@@ -323,6 +323,18 @@ class LocalWinregTests(BaseWinregTests):
...
@@ -323,6 +323,18 @@ class LocalWinregTests(BaseWinregTests):
finally
:
finally
:
DeleteKey
(
HKEY_CURRENT_USER
,
test_key_name
)
DeleteKey
(
HKEY_CURRENT_USER
,
test_key_name
)
def
test_setvalueex_value_range
(
self
):
# Test for Issue #14420, accept proper ranges for SetValueEx.
# Py2Reg, which gets called by SetValueEx, was using PyLong_AsLong,
# thus raising OverflowError. The implementation now uses
# PyLong_AsUnsignedLong to match DWORD's size.
try
:
with
CreateKey
(
HKEY_CURRENT_USER
,
test_key_name
)
as
ck
:
self
.
assertNotEqual
(
ck
.
handle
,
0
)
SetValueEx
(
ck
,
"test_name"
,
None
,
REG_DWORD
,
0x80000000
)
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 @
4482b01d
...
@@ -10,6 +10,9 @@ What's New in Python 3.4.0 Alpha 1?
...
@@ -10,6 +10,9 @@ What's New in Python 3.4.0 Alpha 1?
Core and Builtins
Core and Builtins
-----------------
-----------------
- Issue #14420: Support the full DWORD (unsigned long) range in Py2Reg
when passed a REG_DWORD value. Fixes OverflowError in winreg.SetValueEx.
- Issue #11939: Set the st_dev attribute of stat_result to allow Windows to
- Issue #11939: Set the st_dev attribute of stat_result to allow Windows to
take advantage of the os.path.samefile/sameopenfile/samestat implementations
take advantage of the os.path.samefile/sameopenfile/samestat implementations
used by other platforms.
used by other platforms.
...
...
PC/winreg.c
Dosyayı görüntüle @
4482b01d
...
@@ -785,7 +785,7 @@ Py2Reg(PyObject *value, DWORD typ, BYTE **retDataBuf, DWORD *retDataSize)
...
@@ -785,7 +785,7 @@ Py2Reg(PyObject *value, DWORD typ, BYTE **retDataBuf, DWORD *retDataSize)
memcpy
(
*
retDataBuf
,
&
zero
,
sizeof
(
DWORD
));
memcpy
(
*
retDataBuf
,
&
zero
,
sizeof
(
DWORD
));
}
}
else
{
else
{
DWORD
d
=
PyLong_AsLong
(
value
);
DWORD
d
=
PyLong_As
Unsigned
Long
(
value
);
memcpy
(
*
retDataBuf
,
&
d
,
sizeof
(
DWORD
));
memcpy
(
*
retDataBuf
,
&
d
,
sizeof
(
DWORD
));
}
}
break
;
break
;
...
...
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