summaryrefslogtreecommitdiffstats
path: root/PC/_winreg.c
diff options
context:
space:
mode:
authorChristian Heimes <christian@cheimes.de>2007-12-02 14:31:20 (GMT)
committerChristian Heimes <christian@cheimes.de>2007-12-02 14:31:20 (GMT)
commit217cfd1c86c59ed8a55ce6d6b88bbe37309e7ba2 (patch)
tree4737b4a91359c94953623ab9ee297e9a90f319e4 /PC/_winreg.c
parent1a3284ed69d545e4ef59869998cb8c29233a45fa (diff)
downloadcpython-217cfd1c86c59ed8a55ce6d6b88bbe37309e7ba2.zip
cpython-217cfd1c86c59ed8a55ce6d6b88bbe37309e7ba2.tar.gz
cpython-217cfd1c86c59ed8a55ce6d6b88bbe37309e7ba2.tar.bz2
Cleanup: Replaced most PyInt_ aliases with PyLong_ and disabled the aliases in intobject.h
Diffstat (limited to 'PC/_winreg.c')
-rw-r--r--PC/_winreg.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/PC/_winreg.c b/PC/_winreg.c
index 4deb5a9..e1145b1 100644
--- a/PC/_winreg.c
+++ b/PC/_winreg.c
@@ -614,8 +614,8 @@ PyWinObject_CloseHKEY(PyObject *obHandle)
ok = PyHKEY_Close(obHandle);
}
#if SIZEOF_LONG >= SIZEOF_HKEY
- else if (PyInt_Check(obHandle)) {
- long rc = RegCloseKey((HKEY)PyInt_AsLong(obHandle));
+ else if (PyLong_Check(obHandle)) {
+ long rc = RegCloseKey((HKEY)PyLong_AsLong(obHandle));
ok = (rc == ERROR_SUCCESS);
if (!ok)
PyErr_SetFromWindowsErrWithFunction(rc, "RegCloseKey");
@@ -810,9 +810,9 @@ Reg2Py(BYTE *retDataBuf, DWORD retDataSize, DWORD typ)
switch (typ) {
case REG_DWORD:
if (retDataSize == 0)
- obData = PyInt_FromLong(0);
+ obData = PyLong_FromLong(0);
else
- obData = PyInt_FromLong(*(int *)retDataBuf);
+ obData = PyLong_FromLong(*(int *)retDataBuf);
break;
case REG_SZ:
case REG_EXPAND_SZ:
@@ -1362,7 +1362,7 @@ static struct PyMethodDef winreg_methods[] = {
static void
insint(PyObject * d, char * name, long value)
{
- PyObject *v = PyInt_FromLong(value);
+ PyObject *v = PyLong_FromLong(value);
if (!v || PyDict_SetItemString(d, name, v))
PyErr_Clear();
Py_XDECREF(v);