[feature request] function declaration
dlcall -n window -r pointer gtk_application_window_new $app requires specifying the return type.
Is there anything preventing the implementation of a declare_function builtin, such that
declare_function gtk_application_window_new pointer pointer would inform ctypes.sh
about the return type (and the types of the parameters for where this changes the ABI),
and such that a later dlcall with no type specified for a function with that name would
use this information?
additionally, this would make it possible to ship the equivalent of header files for libc, so that calling functions from the standard library never requires specifying the type.
Hmm, I see your point, but I wonder if we can just do it in pure bash.. e.g.
function gtk_application_window_new()
{
dlcall -r pointer gtk_application_window_new $1
}
Although I guess that means you can't pass other options to dlcall... hmm, maybe we do need a helper.