Put in a dummy py_init when compiling with PydPythonExtension. This leaves the main implementation clean and prevents "Statement not reachable" errors.
Put in a dummy py_init when compiling with PydPythonExtension. This leaves the main implementation clean and prevents "Statement not reachable" errors.

Note that the dummy function is a no-arg template, so pyd itself will compile fine either way, the error is only triggered by auto-instantiating calls in client code.

ariovistus/pyd,John-Colvin/pyd,ariovistus/pyd,ariovistus/pyd