umka-lang icon indicating copy to clipboard operation
umka-lang copied to clipboard

Calling interface functions

Open TheOnlySilverClaw opened this issue 7 months ago • 2 comments

For scripting purposes, it would be very useful if Umka would allow interface methods to be called on a given pointer through the C API, either via umkaCall or a different function.

TheOnlySilverClaw avatar May 20 '25 20:05 TheOnlySilverClaw

Will work on it!

For now, in order not to block your further work, I suggest you testing the plugin system prototype I made. It should give you all you need, with only a little more code on the host app side.

plugin-proto.zip

vtereshkov avatar May 20 '25 21:05 vtereshkov

As #511 is now fixed, you can get rid of the zigDispose workaround and use umkaDecRef normally:

// Killing entities (since the host holds references to them)
for (int i = 0; i < numEntities && exitCode == 0; i++)
    umkaDecRef(umka, entities[i]);

vtereshkov avatar Jul 06 '25 00:07 vtereshkov