3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-11 03:33:35 +00:00

Fix Python FiniteDomainSortRef.size()

This commit is contained in:
Angus Lepper 2018-02-20 19:37:17 +00:00 committed by GitHub
parent a2f907c7d1
commit 7b91195770
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -6818,8 +6818,8 @@ class FiniteDomainSortRef(SortRef):
def size(self):
"""Return the size of the finite domain sort"""
r = (ctype.c_ulonglong * 1)()
if Z3_get_finite_domain_sort_size(self.ctx_ref(), self.ast(), r):
r = (ctypes.c_ulonglong * 1)()
if Z3_get_finite_domain_sort_size(self.ctx_ref(), self.ast, r):
return r[0]
else:
raise Z3Exception("Failed to retrieve finite domain sort size")