Author: Wim Lavrijsen <wlavrij...@lbl.gov> Branch: reflex-support Changeset: r71208:563e581721d0 Date: 2014-05-02 14:35 -0700 http://bitbucket.org/pypy/pypy/changeset/563e581721d0/
Log: fix potential overflow problems diff --git a/pypy/module/cppyy/capi/cint_capi.py b/pypy/module/cppyy/capi/cint_capi.py --- a/pypy/module/cppyy/capi/cint_capi.py +++ b/pypy/module/cppyy/capi/cint_capi.py @@ -249,7 +249,7 @@ 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)) @@ -292,7 +292,7 @@ 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 @@ -341,7 +341,7 @@ 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)) _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit