Fix custom file handler function pointer problem on cffi