fix void* ptr usage for lua binding