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/2006-March/062423.html below:

[Python-Dev] About "Coverity Study Ranks LAMP Code Quality"

[Python-Dev] About "Coverity Study Ranks LAMP Code Quality" [Python-Dev] About "Coverity Study Ranks LAMP Code Quality"Fredrik Lundh fredrik at pythonware.com
Wed Mar 15 12:13:03 CET 2006
>> >     return=NULL; output=junk => out of memory
>> >     return=junk; output=-1 => cannot do this
>> >     return=pointer; output=value => did this, returned value bytes
>>
>> > I agree that the design is a bit questionable;
>>
>> It sure is. If you get both NULL and -1 returned, how are
>> you supposed to know which one is the junk?
>
> I was about to say "by doing the tests in the prescribed order",
> but you're right that it's not obvious that the function checks
> that it returns the right kind of junk...  (it's possible that the
> junk in the second line is actually "pointer to some other ob-
> ject").

footnote: it is; the table should read

    return=NULL; output=junk => out of memory
    return=old pointer; output=-1 => no need do this; returning old pointer
    return=new pointer; output=value => did this, returned pointer to newly
        allocated area containing 'value' bytes

</F> 



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