pub unsafe fn set_global_scope(f: fn(&str) -> Option<*const ()>)Expand description
Set the global scope, lazy binding will look for the symbol in the global scope.
§Safety
This function is marked as unsafe because it directly interacts with raw pointers,
and it also requires the user to ensure thread safety.
It is the caller’s responsibility to ensure that the provided function f behaves correctly.
§Parameters
f: A function that takes a symbol name as a parameter and returns an optional raw pointer. If the symbol is found in the global scope, the function should returnSome(raw_pointer), otherwise, it should returnNone.
§Return
This function does not return a value. It sets the global scope for lazy binding.