Opened 20 years ago
Closed 20 years ago
#848 closed defect (fixed)
Java SWIG code compilation problem due to naming convention.
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | high | Milestone: | |
Component: | MapScript-SWIG | Version: | 4.2 |
Severity: | normal | Keywords: | |
Cc: |
Description
Minor problem found due to naming convention use in Java and methods/struct members defined in mapscript.i and header file. i) For example symbolObj has a member name points and a method getPoints() defined. The Java code generated by SWIG contains Java getter/setter for each struct defined. Thus, getPoints() are defined "twice" causing compilation errors. Solution: use #ifdef SWIGJAVA to use a diffirent name for the method extension, e.g. #ifndef SWIGJAVA %newobject getPoints; lineObj *getPoints() { #else %newobject getPoints_; lineObj *getPoints_() { #endif
Attachments (3)
Change History (10)
comment:2 by , 20 years ago
Status: | new → assigned |
---|
#ifndef SWIG pointObj points[MS_MAXVECTORPOINTS]; #endif in both the CVS HEAD and branch-4-2. Can I get some confirmation of a fix?
by , 20 years ago
Attachment: | mapscript.i added |
---|
modified mapscript.i file showing where the Java naming confilcts.
comment:3 by , 20 years ago
Have committed changes to mapscript.i in branch-4-2 which avoid Java conflicts for mapObj.clone, symbol.get/setPoints, outputFormatObj. A patched map.h and mapscript/mapscript.i are attached. These will allow you to test the fix. Please confirm.
by , 20 years ago
Attachment: | bug848-mapserver-4.2.3-1.tar.gz added |
---|
patched map.h and mapscript/mapscript.i 4.2.3-1
by , 20 years ago
Attachment: | bug848-mapserver-4.2.3-2.tar.gz added |
---|
patched map.h, mapsymbol.h, mapscript/mapscript.i 4.2.3-2
comment:4 by , 20 years ago
Patched files 4.2.3-2 works for both C# and Java. Thanks for the quick response.
comment:5 by , 20 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:6 by , 20 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Leave bug resolution to the bug owner. Thanks for the confirmation!
Note:
See TracTickets
for help on using tickets.