30 Sep 14:26
when is path==NULL?
From: Ulrich Eckhardt <eckhardt <at> satorlaser.com>
Subject: when is path==NULL?
Newsgroups: gmane.comp.python.devel
Date: 2008-09-30 12:30:35 GMT
Subject: when is path==NULL?
Newsgroups: gmane.comp.python.devel
Date: 2008-09-30 12:30:35 GMT
Hi!
I'm looking at trunk/Python/sysmodule.c, function PySys_SetArgv(). In that
function, there is code like this:
PyObject* path = PySys_GetObject("path");
...
if (path != NULL) {
...
}
My intuition says that if path==NULL, something is very wrong. At least I
would expect to get 'None', but never NULL, except when out of memory. So,
for the case that path==NULL', I would simply invoke Py_FatalError("no mem
for sys.path"), similarly to the other call there.
Sounds reasonable?
Uli
--
--
Sator Laser GmbH
Geschäftsführer: Thorsten Föcking, Amtsgericht Hamburg HR B62 932
**************************************************************************************
Visit our website at <http://www.satorlaser.de/>
**************************************************************************************
Diese E-Mail einschließlich sämtlicher Anhänge ist nur für den Adressaten bestimmt und kann
vertrauliche Informationen enthalten. Bitte benachrichtigen Sie den Absender umgehend, falls Sie
nicht der beabsichtigte Empfänger sein sollten. Die E-Mail ist in diesem Fall zu löschen und darf weder
(Continue reading)
RSS Feed