The returned function prototype creates functions that use the Python calling convention. Unlike CFUNCTYPE() and WINFUNCTYPE(), ctypes does not release the GIL before calling the foreign function, so the function may safely use the Python C API. Note that this does not prevent the GIL from being released during the call.