Update of /cvsroot/pywin32/pywin32/com/win32com/client
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12983/win32com/client
Modified Files:
genpy.py
Log Message:
Fix issue [ 1651025 ] Use the specified type for constant values
This makes constants in a typelib > sys.maxint to correctly be a long
Index: genpy.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/com/win32com/client/genpy.py,v
retrieving revision 1.50
retrieving revision 1.51
diff -C2 -d -r1.50 -r1.51
*** genpy.py 14 Mar 2006 12:12:43 -0000 1.50
--- genpy.py 7 Feb 2007 23:12:31 -0000 1.51
***************
*** 206,210 ****
if vdesc[4] == pythoncom.VAR_CONST:
val = vdesc[1]
! if type(val)==type(0):
if val==0x80000000L: # special case
use = "0x80000000L" # 'L' for future warning
--- 206,210 ----
if vdesc[4] == pythoncom.VAR_CONST:
val = vdesc[1]
! if type(val) in (type(0), type(0L)):
if val==0x80000000L: # special case
use = "0x80000000L" # 'L' for future warning
|