Adapt example2.c to void* interface change