A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2000-August/008047.html below:

[Python-Dev] Preventing 1.5 extensions crashing under 1.6/2.0 Python

[Python-Dev] Preventing 1.5 extensions crashing under 1.6/2.0 Python [Python-Dev] Preventing 1.5 extensions crashing under 1.6/2.0 PythonFredrik Lundh Fredrik Lundh" <effbot@telia.com
Tue, 8 Aug 2000 17:10:28 +0200
mark wrote:
> So I think that the adoption of our half-solution (ie, we are really =
only
> forcing a better error message - not even getting a traceback to =
indicate
> _which_ module fails)

note that the module name is available to the Py_InitModule4
module (for obvious reasons ;-), so it's not that difficult to
improve the error message.

how about:

...

static char not_initialized_error[] =3D
"ERROR: Module %.200s loaded an uninitialized interpreter!\n\
  This Python has API version %d, module %.200s has version %d.\n";

...

    if (!Py_IsInitialized()) {
        char message[500];
        sprintf(message, not_initialized_error, name, =
PYTHON_API_VERSION,
            name, module_api_version)
        Py_FatalError(message);
    }

</F>




RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4