Would this be feasible?
Import "Some.lib"
MyFunc.s( someparame.l, otherparam.s)
endimport
the ".s" signaling the return type from the function.
Yes, I know we can use openlib/getfunction/prototypes, but this would seem very easy, intuitive and, dare I say it, basic, to ease the import/coding.
Import "some.lib"- and strings.
Re: Import "some.lib"- and strings.
I would like to add pseudotypes to this request:jassing wrote:Import "Some.lib"
MyFunc.s( someparame.l, otherparam.s)
endimport
Please allow pseudotypes for import functions and prototypes as return type.
Code: Select all
ImportC "Some.lib"
MyFunc1.p-Ascii ( arg.p-ascii )
MyFunc2.p-Unicode ( arg.p-Unicode )
MyFunc3.p-utf8 ( arg.p-utf8 )
MyFunc4.p-bstr ( arg.p-bstr )
EndImport
PrototypeC.p-ascii C_func1()
PrototypeC.p-Unicode C_func2()
PrototypeC.p-utf8 C_func3()
PrototypeC.p-bstr C_func4()
In generated ASM, it would be only a call to an internal convert function, directly after calling the function. After that,
we have a PB string. char* = 0 would return an empty PB string.