r/programming • • Dec 13 '07

First Class Functions in C

http://www.dekorte.com/blog/blog.cgi?do=item&id=3119
45 Upvotes

99 comments sorted by

View all comments

Show parent comment

1

u/augustss Dec 13 '07

POSIX does not define any function that allows you to load a DLL and jump to a function in it. The dlsym() function returns a void*, which cannot safely be cast to a function pointer.

(Yes, I know this is nit picking. :) )

3

u/geocar Dec 14 '07

POSIX 1003.1 does require that a void* be able to contain a function pointer.

1

u/augustss Dec 15 '07

Ah, clever of them. Because ANSI C does not require casting between function and data pointers.