Commits

Maciej Fijalkowski committed ef34b3c

test and a fix

  • Participants
  • Parent commits b686e10

Comments (0)

Files changed (2)

File pypy/translator/c/funcgen.py

 from pypy.rpython.lltypesystem.lltype import pyobjectptr, ContainerType
 from pypy.rpython.lltypesystem.lltype import Struct, Array, FixedSizeArray
 from pypy.rpython.lltypesystem.lltype import ForwardReference, FuncType
+from pypy.rpython.lltypesystem.rffi import INT
 from pypy.rpython.lltypesystem.llmemory import Address
 from pypy.translator.backendopt.ssa import SSI_to_SSA
 from pypy.translator.backendopt.innerloop import find_inner_loops
                 continue
             elif T == Signed:
                 format.append('%ld')
+            elif T == INT:
+                format.append('%d')
             elif T == Unsigned:
                 format.append('%lu')
             elif T == Float:

File pypy/translator/c/test/test_standalone.py

         assert "  ll_strtod.o" in makefile
 
     def test_debug_print_start_stop(self):
+        from pypy.rpython.lltypesystem import rffi
+        
         def entry_point(argv):
             x = "got:"
             debug_start  ("mycat")
             debug_stop   ("mycat")
             if have_debug_prints(): x += "a"
             debug_print("toplevel")
+            debug_print("some int", rffi.cast(rffi.INT, 3))
             debug_flush()
             os.write(1, x + "." + str(debug_offset()) + '.\n')
             return 0
         assert 'cat2}' in err
         assert 'baz' in err
         assert 'bok' in err
+        assert 'some int 3' in err
         # check with PYPYLOG=:somefilename
         path = udir.join('test_debug_xxx.log')
         out, err = cbuilder.cmdexec("", err=True,