A RetroSearch Logo

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

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2006-April/063820.html below:

[Python-Dev] posix_confstr seems wrong

[Python-Dev] posix_confstr seems wrong [Python-Dev] posix_confstr seems wrongskip at pobox.com skip at pobox.com
Mon Apr 17 23:39:46 CEST 2006
More C++ stuff...

According to the man page on my Mac:

    If the call to confstr() is not successful, -1 is returned and errno is
    set appropriately.

but the code in posix_confstr looks like:

    if (PyArg_ParseTuple(args, "O&:confstr", conv_confstr_confname, &name)) {
        int len = confstr(name, buffer, sizeof(buffer));

        errno = 0;
        if (len == 0) {
            if (errno != 0)
                posix_error();
            else
                result = PyString_FromString("");
        }
    ...

1. Why is errno being set to 0?

2. Why is errno's value then tested to see if it's not zero?

Looks like this have been that way since December 1999 when Fred added it.

Skip
More information about the Python-Dev mailing list

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