3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-06-28 08:58:44 +00:00

remove EnumToNative as it drops reference counts, fixes #5713

This commit is contained in:
Nikolaj Bjorner 2021-12-16 03:22:54 -08:00
parent 2be93870c8
commit 2caa7e6e45
2 changed files with 21 additions and 28 deletions

View file

@ -131,24 +131,10 @@ namespace Microsoft.Z3
return an;
}
internal static IntPtr[] EnumToNative<T>(IEnumerable<T> a) where T : Z3Object
{
if (a == null) return null;
IntPtr[] an = new IntPtr[a.Count()];
int i = 0;
foreach (var ai in a)
{
if (ai != null) an[i] = ai.NativeObject;
++i;
}
return an;
}
internal static uint ArrayLength(Z3Object[] a)
{
return (a == null)?0:(uint)a.Length;
}
#endregion
#endregion
}
}