Add "module_data" variable to "tests" module. The variable is populated with the data passed for the module at runtime.
@@ -119,6 +119,8 @@ begin_declarations;
declare_float("f");
end_struct("undefined");
+ declare_string("module_data")
+
declare_integer_array("integer_array");
declare_string_array("string_array");
@@ -190,6 +192,10 @@ int module_load(
set_string("foo", module_object, "struct_dict[%s].s", "foo");
set_integer(1, module_object, "struct_dict[%s].i", "foo");
+ if (module_data_size > 0 && module_data != NULL) {
+ set_sized_string(module_data, module_data_size, module_object, "module_data");
+ }
+
return ERROR_SUCCESS;
}
