This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Calls from VBScript clobber passed args
Type: Stage:
Components: Windows Versions:
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: georg.brandl, grincheroo, lambacck, rupole
Priority: normal Keywords:

Created on 2005-03-03 20:42 by grincheroo, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
reproductions.txt grincheroo, 2005-03-03 20:43 Reproduction and workaround code
Messages (7)
msg24443 - (view) Author: Erik Rose (grincheroo) Date: 2005-03-03 20:42
I'm using Python 2.4.0 and VBScript under ASP on IIS 5. If I call a 
Python function from VBScript AND pass a local var as the first 
parameter AND don't use the return value, then the local var I 
passed in is, upon the function's return, set to Null.

If I store the return value (even if there isn't one) OR pass the return 
value to another function, this doesn't happen. I'm attaching some 
snippets that demonstrate and work around the bug.

msg24444 - (view) Author: Erik Rose (grincheroo) Date: 2005-03-08 15:39
Logged In: YES 
user_id=888812

Let me refine the description a bit: the bug doesn't clobber only a local var 
passed as the *first* param; it clobbers the first local var passed, whether 
it's the first param or not. For example,

call go(x)
clobbers x, as I've said before, but...

call aTwoParamFunction("somethingStatic", x, y)
clobbers x as well! y is not clobbered.
msg24445 - (view) Author: Erik Rose (grincheroo) Date: 2005-03-08 15:39
Logged In: YES 
user_id=888812

Let me refine the description a bit: the bug doesn't clobber only a local var 
passed as the *first* param; it clobbers the first local var passed, whether 
it's the first param or not. For example,

call go(x)
clobbers x, as I've said before, but...

call aTwoParamFunction("somethingStatic", x, y)
clobbers x as well! y is not clobbered.
msg24446 - (view) Author: Erik Rose (grincheroo) Date: 2005-03-08 15:41
Logged In: YES 
user_id=888812

Let me refine the description a bit: the bug doesn't clobber only a local var 
passed as the *first* param; it clobbers the first local var passed, whether 
it's the first param or not. For example,

call go(x)
clobbers x, as I've said before, but...

call aTwoParamFunction("somethingStatic", x, y)
clobbers x as well! y is not clobbered.
msg24447 - (view) Author: Roger Upole (rupole) Date: 2006-09-01 21:08
Logged In: YES 
user_id=771074

I think this is actually a vbscript behaviour.  If not, 
it's a bug in Pywin32's Active Scripting implementation.  
Either way, this shoud probably be closed as third-party.
msg24448 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2006-09-30 11:01
Logged In: YES 
user_id=849994

Agreed.
msg132023 - (view) Author: Chris Lambacher (lambacck) * Date: 2011-03-24 20:04
copied to pywin32 bug tracker: http://sourceforge.net/tracker/index.php?func=detail&aid=3238774&group_id=78018&atid=551954
History
Date User Action Args
2022-04-11 14:56:10adminsetgithub: 41647
2011-03-24 20:04:58lambaccksetnosy: + lambacck
messages: + msg132023
2005-03-03 20:42:59grincheroocreate