another seemingly redundant void_p cast that is apparently essential on MacOS