@needs_dlfcn
def test_dylink_static_funcpointers(self):
    self.dylink_test(main='\n      #include <stdio.h>\n      #include "header.h"\n      void areturn0() { printf("hello 0\\n"); }\n      void areturn1() { printf("hello 1\\n"); }\n      void areturn2() { printf("hello 2\\n"); }\n      voidfunc func_ptrs[3] = { areturn0, areturn1, areturn2 };\n      int main(int argc, char **argv) {\n        sidey(func_ptrs[0]);\n        sidey(func_ptrs[1]);\n        sidey(func_ptrs[2]);\n        return 0;\n      }\n      ', side='\n      #include "header.h"\n      void sidey(voidfunc f) { f(); }\n      ', expected='hello 0\nhello 1\nhello 2\n', header='typedef void (*voidfunc)(); void sidey(voidfunc f);')
@needs_dlfcn
def test_dylink_static_funcpointers(self):
    self.dylink_test(main='\n      #include <stdio.h>\n      #include "header.h"\n      void areturn0() { printf("hello 0\\n"); }\n      void areturn1() { printf("hello 1\\n"); }\n      void areturn2() { printf("hello 2\\n"); }\n      voidfunc func_ptrs[3] = { areturn0, areturn1, areturn2 };\n      int main(int argc, char **argv) {\n        sidey(func_ptrs[0]);\n        sidey(func_ptrs[1]);\n        sidey(func_ptrs[2]);\n        return 0;\n      }\n      ', side='\n      #include "header.h"\n      void sidey(voidfunc f) { f(); }\n      ', expected='hello 0\nhello 1\nhello 2\n', header='typedef void (*voidfunc)(); void sidey(voidfunc f);')