Thanks Peter. I merged this with some changes: http://git.zx2c4.com/cgit/commit/?id=9abe4a26a92b91170cb9c5dab830b40fb1e0327f Note that in C you need to specify (void) in the argument list if it doesn't take any arguments. Otherwise it takes a variable number of arguments.