[Gambas-bugtracker] Bug #2255: Gambas3 Structs Array still confused with EXTERN call
bugtracker at gambaswiki.org
bugtracker at gambaswiki.org
Mon Jun 14 02:06:22 CEST 2021
http://gambaswiki.org/bugtracker/edit?object=BUG.2255&from=L21haW4-
Comment #6 by John ANDERSON:
If I put this on mailing list, somebody will tell me to put it on bug tracker anyway...
The bug still exists...the popup is still telling me that Copy is a choice on MyBigArray
Well, I'm going to have to call EXTERN calls like this, no choice. I need a flat, continuous binary array on Gambas side, without Gambas objects getting in way.
So this EXTERN call has to work, somehow. This is an example, it is not always memmove - it will be our C code that needs access to a continuous, binary array of structs, and it may modify one struct from the array and send it back. Everything memmove does.
I did everything here like Wiki tells me how. And all that happens is it tells it was expecting pointer, not Mystruct. But wiki says if I define a struct and just send struct in function call, that should work "use ABC" in function call.
The same thing will happen if I call memmove with MyBigArray[5], MyBigArray or (VarPtr(MyBigArray) + 5*Structlen)
Let me know what I did wrong, I tried to follow wiki and try variants I could think of.
----------------------------------------------------------------------------
Attachment: TestStruct3a_Project.tar.gz
Attachment: StructF_Trying_EXTERN_Call_WikiWay.png
More information about the Bugtracker
mailing list