From 1c3fb498783a13ab043524fc20eb3a39e23d281a Mon Sep 17 00:00:00 2001 From: Nikolaj Bjorner Date: Tue, 25 Nov 2025 21:44:41 -0800 Subject: [PATCH] port dotnet to use bool sorts from API Signed-off-by: Nikolaj Bjorner --- src/api/dotnet/FPNum.cs | 6 +++--- src/api/dotnet/Log.cs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/api/dotnet/FPNum.cs b/src/api/dotnet/FPNum.cs index e21355f72..272286851 100644 --- a/src/api/dotnet/FPNum.cs +++ b/src/api/dotnet/FPNum.cs @@ -50,10 +50,10 @@ namespace Microsoft.Z3 { get { - int res = 0; - if (Native.Z3_fpa_get_numeral_sign(Context.nCtx, NativeObject, ref res) == 0) + bool res = false; + if (!Native.Z3_fpa_get_numeral_sign(Context.nCtx, NativeObject, ref res)) throw new Z3Exception("Sign is not a Boolean value"); - return res != 0; + return res; } } diff --git a/src/api/dotnet/Log.cs b/src/api/dotnet/Log.cs index a94c29bc6..f2ad89192 100644 --- a/src/api/dotnet/Log.cs +++ b/src/api/dotnet/Log.cs @@ -41,7 +41,7 @@ namespace Microsoft.Z3 public static bool Open(string filename) { m_is_open = true; - return Native.Z3_open_log(filename) == 1; + return Native.Z3_open_log(filename); } ///