Closed
Bug 347865
Opened 19 years ago
Closed 18 years ago
PyXPCOM fails to build on alpha
Categories
(Core :: XPCOM, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: glandium, Assigned: glandium)
Details
Attachments
(1 file)
3.92 KB,
patch
|
markh
:
review+
|
Details | Diff | Splinter Review |
When building PyXPCOM on alpha, we get the following error (with 1.8 branch, but the code responsible for the error is still on trunk):
c++ -o PyGBase.o -c -fvisibility=hidden -DMOZILLA_INTERNAL_API -DOSTYPE=\"Linux2.6.14\" -DOSARCH=\"Linux\" -DBUILD_ID=0000000000 -I/usr/include/python2.3 -I../../../../dist/include/xpcom -I../../../../dist/include/string -I../../../../dist/include/pyxpcom -I../../../../dist/include -I../../../../dist/include/nspr -fPIC -fno-rtti -fno-exceptions -Wall -Wconversion -Wpointer-arith -Wcast-align -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -Wno-long-long -mieee -fshort-wchar -pthread -pipe -DNDEBUG -DTRIMMED -O2 -fno-strict-aliasing -g -DMOZILLA_CLIENT -include ../../../../mozilla-config.h -Wp,-MD,.deps/PyGBase.pp PyGBase.cpp
PyGBase.cpp: In member function 'nsresult PyG_Base::InvokeNativeGetViaPolicy(const char*, PyObject**)':
PyGBase.cpp:613: error: no matching function for call to 'PyG_Base::InvokeNativeViaPolicyInternal(char [256], PyObject**&, int, int)'
PyGBase.cpp:563: note: candidates are: nsresult PyG_Base::InvokeNativeViaPolicyInternal(const char*, PyObject**, const char*, va_list)
make[5]: *** [PyGBase.o] Error 1
The code at PyGBase.cpp:613 reads:
ret = InvokeNativeViaPolicyInternal(buf, ppResult, nsnull, nsnull);
InvokeNativeViaPolicyInternal is defined as stated in the error message as InvokeNativeViaPolicyInternal(const char*, PyObject**, const char*, va_list), and va_lists are implemented as struct on alpha, thus nsnull can't be a good value for it.
A possible workaround would be to add a va_list va variable definition in the caller function (InvokeNativeGetViaPolicy) and call InvokeNativeViaPolicyInternal with this newly added va as last argument instead of nsnull. It won't be used anyway since szFormat is null and that makes do_dispatch() not use the va argument.
A probable fix would be to just remove the InvokeNativeGetViaPolicy, it seemsto be unused. InvokeNativeSetViaPolicy shall be removed too.
I can come up with a patch for either of these solutions, I just need to know which one ;)
Assignee | ||
Updated•19 years ago
|
OS: Windows Server 2003 → Linux
Hardware: PC → DEC
Comment 1•19 years ago
|
||
Mark: Can you give some advice here which solution should be used?
Comment 2•19 years ago
|
||
I'm happy for InvokeNativeGetViaPolicy and InvokeNativeSetViaPolicy to be removed as old dead code. I've removed them locally and confirmed the world still builds. Please confirm this fixes things on the 1.8 branch and check that removal in there (after approval etc obviously). I'll be happy to make the same change on the trunk.
Assignee | ||
Comment 3•19 years ago
|
||
This is the patch I'm going to apply and test locally. I'll ask for review after I confirm it is okay.
Assignee | ||
Comment 4•19 years ago
|
||
Comment on attachment 232863 [details] [diff] [review]
Patch
I confirm that the patch works on 1.8.0 branch.
Attachment #232863 -
Flags: review?(mhammond)
Updated•19 years ago
|
Attachment #232863 -
Flags: review?(mhammond) → review+
Comment 5•19 years ago
|
||
I've checked this into the trunk.
Updated•18 years ago
|
Assignee: mhammond → mh+mozilla
Comment 6•18 years ago
|
||
This was checked-in at 2006-08-09 06:37. Resolving as fixed.
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•