[Patches] [Patch #103933] sys.path not set correctly when embedded

noreply@sourceforge.net noreply@sourceforge.net
Thu, 22 Feb 2001 08:36:35 -0800


Patch #103933 has been updated. 

Project: python
Category: Windows
Status: Open
Submitted by: theller
Assigned to : mhammond
Summary: sys.path not set correctly when embedded

Follow-Ups:

Date: 2001-Feb-22 08:36
By: theller

Comment:
There's another semicolon after the second loop, in the else-clause of the
if(skipCore) statement.

I'm not sure whether the semicolon should be inserted or not,
IF it is inserted, the buffer is too small and the RegQueryValueEx() fails
with error 234 (More data is available). Well, only on Win98 and if there
are no subkeys.
-------------------------------------------------------

Date: 2001-Feb-21 17:55
By: tim_one

Comment:
Assigned to Mark, as it's his code and I don't understand it offhand. 
Mark, this is a very simple (one-liner) patch.

theller, I don't understand your comment.  What semicolon are you talking
about?  The preceding loop incremented dataSize by the lengths of all
items, + one more for each item to hold a semicolon after it.  And that's
all the semicolons there are.

It appears to me that the second loop is *incorrect*, in that it adds a
semicolon whenever index>0, regardless of whether ppPaths[index] is or
isn't NULL, and so may end up inserting arbitrarily more semicolons than
the preceding loop saved space for.  But if that's what's going on, your
patch doesn't fix it in general, it would just cover up the simplest
failing case.
-------------------------------------------------------

Date: 2001-Feb-21 13:07
By: theller

Comment:
Assigned to Tim, one of the windows guys:-)

This is urgent.
-------------------------------------------------------

-------------------------------------------------------
For more info, visit:

http://sourceforge.net/patch/?func=detailpatch&patch_id=103933&group_id=5470