Update of /cvsroot/pywin32/pywin32/win32/src
In directory sc8-pr-cvs1:/tmp/cvs-serv29812
Modified Files:
win32apimodule.cpp
Log Message:
Fix case of #include, and avoid going via a double to get a long int for
RegQueryInfoKey()
Index: win32apimodule.cpp
===================================================================
RCS file: /cvsroot/pywin32/pywin32/win32/src/win32apimodule.cpp,v
retrieving revision 1.29
retrieving revision 1.30
diff -C2 -d -r1.29 -r1.30
*** win32apimodule.cpp 26 Oct 2003 03:59:51 -0000 1.29
--- win32apimodule.cpp 31 Oct 2003 12:06:07 -0000 1.30
***************
*** 27,31 ****
#define SECURITY_WIN32 // required by below
! #include "Security.h" // for GetUserNameEx
#define DllExport _declspec(dllexport)
--- 27,31 ----
#define SECURITY_WIN32 // required by below
! #include "security.h" // for GetUserNameEx
#define DllExport _declspec(dllexport)
***************
*** 560,564 ****
return NULL;
}
! for (int i=0;i<len;i++) {
PyObject *subObject = PySequence_GetItem(obInserts, i);
if (subObject==NULL) {
--- 560,565 ----
return NULL;
}
! int i;
! for (i=0;i<len;i++) {
PyObject *subObject = PySequence_GetItem(obInserts, i);
if (subObject==NULL) {
***************
*** 2538,2548 ****
}
- static double LI2double(LARGE_INTEGER *li)
- {
- double d=li->LowPart;
- d=d+pow(2.0,32.0)*li->HighPart;
- return d;
- }
-
// @pymethod (int, int, long)|win32api|RegQueryInfoKey|Returns the number of
// subkeys, the number of values a key has,
--- 2539,2542 ----
***************
*** 2557,2561 ****
DWORD nSubKeys, nValues;
FILETIME ft;
- LARGE_INTEGER li;
PyObject *l;
--- 2551,2554 ----
***************
*** 2574,2580 ****
)!=ERROR_SUCCESS)
return ReturnAPIError("RegQueryInfoKey", rc);
! li.LowPart=ft.dwLowDateTime;
! li.HighPart=ft.dwHighDateTime;
! if (!(l=PyLong_FromDouble(LI2double(&li))))
return NULL;
PyObject *ret = Py_BuildValue("iiO",nSubKeys,nValues,l);
--- 2567,2571 ----
)!=ERROR_SUCCESS)
return ReturnAPIError("RegQueryInfoKey", rc);
! if (!(l=PyLong_FromTwoInts(ft.dwHighDateTime, ft.dwLowDateTime)))
return NULL;
PyObject *ret = Py_BuildValue("iiO",nSubKeys,nValues,l);
|