PrototypesΒΆ

#include <glib.h>
#include <stdio.h>

char* f(int x, int y) {
    return "ff";
}

GHashTable create_object() {
    GHashTable* hash = g_hash_table_new(g_str_hash, g_str_equal);
    g_hash_table_insert(hash, "f", &f);
}

int main(int argc, char *argv[]) {
     GHashTable object = create_object();
     void* (*y)() = g_hash_table_lookup(object,"f");
    printf("Method Call %s\n",  y(1,2));
    g_hash_table_destroy(hash);
    return 0;
}