diff --git a/src/asar-dll-bindings/c/asardll.h b/src/asar-dll-bindings/c/asardll.h
index b1a6132a..bc2f55db 100644
--- a/src/asar-dll-bindings/c/asardll.h
+++ b/src/asar-dll-bindings/c/asardll.h
@@ -191,8 +191,8 @@ asarfunc const char * (*asar_getdefine)(const char * name);
//Gets the values and names of all defines.
asarfunc const struct definedata * (*asar_getalldefines)(int * count);
-//Parses all defines in the parameter. The parameter controls whether it'll learn new defines in
-// this string if it finds any. Note that it may emit errors.
+//Parses all defines in the parameter. If there were any errors, returns an empty string.
+//learnnew has not done anything for at least 12 years.
asarfunc const char * (*asar_resolvedefines)(const char * data, bool learnnew);
//Parses a string containing math. It automatically assumes global scope (no namespaces), and has
diff --git a/src/asar-dll-bindings/c_sharp/asar.cs b/src/asar-dll-bindings/c_sharp/asar.cs
index ec4481bb..38bc1a02 100644
--- a/src/asar-dll-bindings/c_sharp/asar.cs
+++ b/src/asar-dll-bindings/c_sharp/asar.cs
@@ -63,7 +63,7 @@ public static unsafe class Asar
private static extern RawAsarDefine* asar_getalldefines(out int length);
[DllImport("asar", EntryPoint = "asar_resolvedefines", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.Cdecl)]
- private static extern IntPtr asar_resolvedefines(string data, bool learnNew);
+ private static extern IntPtr asar_resolvedefines(string data);
[DllImport("asar", EntryPoint = "asar_math", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.Cdecl)]
private static extern double asar_math(string math, out IntPtr error);
@@ -179,7 +179,9 @@ private struct RawPatchParams
public int warning_setting_count;
public RawMemoryFile* memory_files;
public int memory_file_count;
+ [MarshalAs(UnmanagedType.I1)]
public bool override_checksum_gen;
+ [MarshalAs(UnmanagedType.I1)]
public bool generate_checksum;
};
@@ -518,7 +520,7 @@ public static Asardefine[] getalldefines()
///
public static string resolvedefines(string data, bool learnNew)
{
- return Marshal.PtrToStringAnsi(asar_resolvedefines(data, learnNew));
+ return Marshal.PtrToStringAnsi(asar_resolvedefines(data));
}
///
diff --git a/src/asar-dll-bindings/python/asar.py b/src/asar-dll-bindings/python/asar.py
index 3ee2943e..d3589362 100644
--- a/src/asar-dll-bindings/python/asar.py
+++ b/src/asar-dll-bindings/python/asar.py
@@ -145,8 +145,7 @@ def __init__(self, dllname):
self.setup_func("getlabelval", (c_char_p,), c_int)
self.setup_func("getdefine", (c_char_p,), c_char_p)
self.setup_func("getalldefines", (c_int_ptr,), POINTER(_definedata))
- self.setup_func("resolvedefines", (c_char_p, ctypes.c_bool),
- c_char_p)
+ self.setup_func("resolvedefines", (c_char_p,), c_char_p)
self.setup_func("math", (c_char_p, POINTER(c_char_p)),
ctypes.c_double)
self.setup_func("getwrittenblocks", (c_int_ptr,),
@@ -376,14 +375,14 @@ def getalldefines():
return {x.name.decode(): x.contents.decode() for x in definedatas}
-def resolvedefines(data, learnnew):
+def resolvedefines(data, learnnew=False):
"""Parse all defines in the given data.
Returns the data with all defines evaluated.
- learnnew controls whether it'll learn new defines in this string if it
- finds any. Note that it may emit errors.
+ If there were any errors, returns an empty string.
+ learnnew has never done anything.
"""
- return _asar.dll.asar_resolvedefines(data, learnnew)
+ return _asar.dll.asar_resolvedefines(data)
def math(to_calculate):