Ticket #847 (closed defect: fixed)
mapscript.i are using C# keywords (string, in, out) as parameter causing SWIG compilation to fail.
| Reported by: | ykchoo@… | Owned by: | sgillies@… |
|---|---|---|---|
| Priority: | high | Milestone: | |
| Component: | MapScript-SWIG | Version: | 4.2 |
| Severity: | normal | Keywords: | |
| Cc: |
Description
Three problems identified when compiling mapscript.i using SWIG (1.3.21) 1) C# (csharp) keywords are being used as parameters: string, in, and out. The files generated using SWIG (1.3.21) will not compile because of the keywords. For example "char *string" parameter is generated as "string string". Solution: renaming parameters with the keywords or use "#ifdef SWIGCSHAR" ... 2) The latest SWIG(1.3.21) has a bug in handling methods returning a pointer. For example "int *foo()" will be converted to "href int foo()". This will not work because href can only be used when defining parameter. Solution: Add a #ifdef, i.e. #ifndef SWIGCSHARP %include typemaps.i #endif 3) labelCacheMemberObj structure contain a member named string. Solution: edit the generated labelCacheMember.cs file "string string" to something like "string strings". I'm not sure what's the impact if it is possible to rename the "string" member.
Attachments
Change History
Note: See
TracTickets for help on using
tickets.

