Commits

wlav committed 563e581

fix potential overflow problems

  • Participants
  • Parent commits c31d7ee
  • Branches reflex-support

Comments (0)

Files changed (1)

pypy/module/cppyy/capi/cint_capi.py

 
 def activate_branch(space, w_branch):
     w_branches = space.call_method(w_branch, "GetListOfBranches")
-    for i in range(space.int_w(space.call_method(w_branches, "GetEntriesFast"))):
+    for i in range(space.r_longlong_w(space.call_method(w_branches, "GetEntriesFast"))):
         w_b = space.call_method(w_branches, "At", space.wrap(i))
         activate_branch(space, w_b)
     space.call_method(w_branch, "SetStatus", space.wrap(1))
     activate_branch(space, w_branch)
 
     # figure out from where we're reading
-    entry = space.int_w(space.call_method(w_self, "GetReadEntry"))
+    entry = space.r_longlong_w(space.call_method(w_self, "GetReadEntry"))
     if entry == -1:
         entry = 0
 
         self.w_tree = w_tree
 
         self.current  = 0
-        self.maxentry = space.int_w(space.call_method(w_tree, "GetEntriesFast"))
+        self.maxentry = space.r_longlong_w(space.call_method(w_tree, "GetEntriesFast"))
 
         space = self.space = tree.space          # holds the class cache in State
         space.call_method(w_tree, "SetBranchStatus", space.wrap("*"), space.wrap(0))