tags:

views:

157

answers:

2
typedef int py_var_t (void *);

it is used as:

py_var_t *somesymbol
+21  A: 

It defines py_var_t to be the type of a function returning int and taking a void* pointer as argument.

milan1612
+1. Good answer.
Pablo Santa Cruz
+1. Short and precise answer.
psihodelia
+8  A: 

This:

typedef int py_var_t (void *);

defines the type of the function as described by @milan1612. Then this:

py_var_t *somesymbol;

creates a pointer to such a function. You could also have created the pointer like this:

int (*somesymbol)(void *);

but use of typedefs is better practice, particularly when the function types get more complicated.

anon