[pypy-svn] r54535 - pypy/dist/pypy/module/_minimal_curses

arigo at codespeak.net arigo at codespeak.net
Wed May 7 17:19:56 CEST 2008


Author: arigo
Date: Wed May  7 17:19:54 2008
New Revision: 54535

Modified:
   pypy/dist/pypy/module/_minimal_curses/fficurses.py
Log:
64-bit fixes.


Modified: pypy/dist/pypy/module/_minimal_curses/fficurses.py
==============================================================================
--- pypy/dist/pypy/module/_minimal_curses/fficurses.py	(original)
+++ pypy/dist/pypy/module/_minimal_curses/fficurses.py	Wed May  7 17:19:54 2008
@@ -28,17 +28,18 @@
                                     INT, INT, INT, INT, INT], rffi.CCHARP,
                           compilation_info=eci)
 
-ERR = rffi.CConstant('ERR', INT)
-OK = rffi.CConstant('OK', INT)
+ERR = rffi.CConstant('ERR', lltype.Signed)
+OK = rffi.CConstant('OK', lltype.Signed)
 
 def curses_setupterm(term, fd):
     intp = lltype.malloc(INTP.TO, 1, flavor='raw')
     err = rffi.cast(lltype.Signed, c_setupterm(term, fd, intp))
     try:
         if err == ERR:
-            if intp[0] == 0:
+            errret = rffi.cast(lltype.Signed, intp[0])
+            if errret == 0:
                 msg = "setupterm: could not find terminal"
-            elif intp[0] == -1:
+            elif errret == -1:
                 msg = "setupterm: could not find terminfo database"
             else:
                 msg = "setupterm: unknown error"



More information about the Pypy-commit mailing list