Skip to content

Commit b10e09b

Browse files
authored
Merge: Replace z3_get_error_msg_ex with z3_get_error_msg
Fixes IagoAbal#20. The z3_get_error_msg_ex function was removed from the Z3 C API for version 4.8.5 of Z3, which caused a linker error. This removes the references to z3_get_error_msg_ex and replaces them with z3_get_error_msg to fix that linker error.
2 parents 5023693 + a5ae69b commit b10e09b

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

src/Z3/Base.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2498,7 +2498,7 @@ z3Error cd = throw . Z3Error cd
24982498
checkError :: Ptr Z3_context -> IO a -> IO a
24992499
checkError cPtr m = do
25002500
m <* (z3_get_error_code cPtr >>= throwZ3Exn)
2501-
where getErrStr i = peekCString =<< z3_get_error_msg_ex cPtr i
2501+
where getErrStr i = peekCString =<< z3_get_error_msg i
25022502
throwZ3Exn i = when (i /= z3_ok) $ getErrStr i >>= z3Error (toZ3Error i)
25032503

25042504
---------------------------------------------------------------------

src/Z3/Base/C.hsc

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1453,10 +1453,6 @@ foreign import ccall unsafe "Z3_set_error"
14531453
foreign import ccall unsafe "Z3_get_error_msg"
14541454
z3_get_error_msg :: Z3_error_code -> IO Z3_string
14551455

1456-
-- | Reference: <http://z3prover.github.io/api/html/group__capi.html#gae0aba52b5738b2ea78e0d6ad67ef1f92>
1457-
foreign import ccall unsafe "Z3_get_error_msg_ex"
1458-
z3_get_error_msg_ex :: Ptr Z3_context -> Z3_error_code -> IO Z3_string
1459-
14601456
---------------------------------------------------------------------
14611457
-- * Miscellaneous
14621458

0 commit comments

Comments
 (0)