INNER CODE UNIT · Python

external_pointer_fix

gecko0307/dagon · extensions/audio/src/bindbc/soloud/generate.py:42

def external_pointer_fix(param):
    if param == "SoloudObject":
        return "int*"
    return param

function_signatures = ""
function_decls = ""
function_loaders = ""

for x in soloud_codegen.soloud_type:
    first = True
    for y in soloud_codegen.soloud_func:
        if (x + "_") == y[1][0:len(x)+1:]:
            if first:
                # Declare creator and destroyer
                function_signatures += ('    alias @nogc nothrow int* function() da_%s_create;\n'%(x))
                function_decls += ('    da_%s_create %s_create;\n'%(x, x))
                function_loaders += ('    lib.bindSymbol(cast(void**)&%s_create, \"%s_create\");\n'%(x, x))

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…