Oct. 19, 2007
8:24 a.m.
Matthieu Brucher wrote:
This is not very different from the Numpy API interface. You have an array of void* that contains your functions, and then you define macros that use this array with a cast to get the real function. Here, it seems that there is no array, but the result is identical (but it shouldn't redefine an already defined function :|) Yes, sure, arrays of function pointers are nothing unusual. But for some time, I was really wondering how could a preprocessor symbol refer to itself (it did not, it was just a function). I still do not understand how a function pointer can generate invalid opcode (the error message seems to appear only with gcc 4.2, not with 4.1, which is still really common), though.
cheers, David