Skip to content

Commit 6f3db09

Browse files
committed
Fixes for piranha integer
Issue is because piranha::integer has no implicit conversion from int
1 parent 1df763b commit 6f3db09

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

symengine/lib/symengine.pxd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ cdef extern from 'symengine/mp_class.h' namespace "SymEngine":
2121
integer_class(int i)
2222
integer_class(integer_class)
2323
integer_class(mpz_t)
24-
integer_class(const string &s, int base) except +
24+
integer_class(const string &s) except +
2525
mpz_t get_mpz_t(integer_class &a)
2626
const mpz_t get_mpz_t(const integer_class &a)
2727
cdef cppclass rational_class:

symengine/lib/symengine_wrapper.pyx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -741,12 +741,12 @@ cdef class Integer(Number):
741741
# Too big, need to use mpz
742742
int_ok = False
743743
tmp = str(i).encode("utf-8")
744-
i__ = symengine.integer_class(tmp, 10)
744+
i__ = symengine.integer_class(tmp)
745745
# Note: all other exceptions are left intact
746746
if int_ok:
747-
self.thisptr = symengine.make_rcp_Integer(i_)
747+
self.thisptr = <RCP[const symengine.Basic]>symengine.integer(i_)
748748
else:
749-
self.thisptr = symengine.make_rcp_Integer(i__)
749+
self.thisptr = <RCP[const symengine.Basic]>symengine.integer(i__)
750750

751751
def __hash__(self):
752752
return deref(self.thisptr).hash()

0 commit comments

Comments
 (0)