mirror of
https://github.com/Z3Prover/z3
synced 2025-04-23 17:15:31 +00:00
added get_version to z3py
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
parent
b472a36b42
commit
1ec0d02ead
1 changed files with 16 additions and 0 deletions
|
@ -49,6 +49,22 @@ def enable_trace(msg):
|
|||
def disable_trace(msg):
|
||||
Z3_disable_trace(msg)
|
||||
|
||||
def get_version_string():
|
||||
major = ctypes.c_uint(0)
|
||||
minor = ctypes.c_uint(0)
|
||||
build = ctypes.c_uint(0)
|
||||
rev = ctypes.c_uint(0)
|
||||
Z3_get_version(major, minor, build, rev)
|
||||
return "%s.%s.%s" % (major.value, minor.value, build.value)
|
||||
|
||||
def get_version():
|
||||
major = ctypes.c_uint(0)
|
||||
minor = ctypes.c_uint(0)
|
||||
build = ctypes.c_uint(0)
|
||||
rev = ctypes.c_uint(0)
|
||||
Z3_get_version(major, minor, build, rev)
|
||||
return (major.value, minor.value, build.value, rev.value)
|
||||
|
||||
# We use _z3_assert instead of the assert command because we want to
|
||||
# produce nice error messages in Z3Py at rise4fun.com
|
||||
def _z3_assert(cond, msg):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue