[pywin32-bugs] [ pywin32-Patches-1651025 ] Use the specified type for constant values
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: SourceForge.net <no...@so...> - 2007-02-07 23:13:40
|
Patches item #1651025, was opened at 2007-02-03 10:54 Message generated for change (Comment added) made by mhammond You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551956&aid=1651025&group_id=78018 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None >Status: Closed >Resolution: Fixed Priority: 5 Private: No Submitted By: Brandon Ehle (azverkan) Assigned to: Nobody/Anonymous (nobody) Summary: Use the specified type for constant values Initial Comment: When parsing constant types from the Type Library, the value can be casted incorrectly when converting unsigned integers to python types. ---------------------------------------------------------------------- >Comment By: Mark Hammond (mhammond) Date: 2007-02-08 10:13 Message: Logged In: YES user_id=14198 Originator: NO Excellent - thanks! Checking in TestSources/PyCOMTest/PyCOMImpl.cpp; new revision: 1.14; previous revision: 1.13 Checking in TestSources/PyCOMTest/PyCOMImpl.h; new revision: 1.13; previous revision: 1.12 Checking in TestSources/PyCOMTest/PyCOMTest.idl; new revision: 1.14; previous revision: 1.13 Checking in win32com/client/genpy.py; new revision: 1.51; previous revision: 1.50 Checking in win32com/servers/test_pycomtest.py; new revision: 1.12; previous revision: 1.11 Checking in win32com/src/oleargs.cpp; new revision: 1.37; previous revision: 1.36 Checking in win32com/src/extensions/PyVARDESC.cpp; new revision: 1.2; previous revision: 1.1 Checking in win32com/test/testPyComTest.py; new revision: 1.26; previous revision: 1.25 ---------------------------------------------------------------------- Comment By: Brandon Ehle (azverkan) Date: 2007-02-07 13:12 Message: Logged In: YES user_id=1616 Originator: YES File Added: pywin32.patch ---------------------------------------------------------------------- Comment By: Brandon Ehle (azverkan) Date: 2007-02-07 13:08 Message: Logged In: YES user_id=1616 Originator: YES I've got a test case cobbled together and updated the patch to call VariantClear(). The only problem is that the testcase doesn't automatically detect breakage because of the cache in the site-packages\win32com\gen_py directory. Is there something special when running the tests that you need to do to get it to regenerate the cached interfaces? ---------------------------------------------------------------------- Comment By: Mark Hammond (mhammond) Date: 2007-02-05 14:08 Message: Logged In: YES user_id=14198 Originator: NO Sorry - I meant "diff -u" not "-c" ---------------------------------------------------------------------- Comment By: Mark Hammond (mhammond) Date: 2007-02-05 12:56 Message: Logged In: YES user_id=14198 Originator: NO Thanks for the patch. In principle this seems reasonable. Could you please submit a new patch generated with "-c", otherwise it might apply incorrectly. It looks like you should also VariantClear(&varValue)? Finally, can you please give some indication of how this bug manifests itself? My intent is to get something added to the test suite which demonstrates how things go wrong now, and how this patch fixes them. Looking at the patch, it looks simply like a huge constant value in an IDL should be able to provoke it. Cheers ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551956&aid=1651025&group_id=78018 |