Opened 15 years ago

Closed 15 years ago

#2839 closed defect (fixed)

GetFieldAsStringList c# and Python wraper

Reported by: iuliani Owned by: hobu
Priority: normal Milestone: 1.6.1
Component: PythonBindings Version: unspecified
Severity: normal Keywords:
Cc: hobu

Description

I cannot obtain the string list from a field of type StringList from an ENC (using s57 driver) using:

public void GetFieldAsStringList(int id, SWIGTYPE_p_p_p_char pList)

Can it be replaced with something like:

public void GetFieldAsStringList(int id, out string[] pList)

Attached is a ENC map which containd StringList Fields

Attachments (1)

RO500002.000 (347.5 KB ) - added by iuliani 15 years ago.
ENC S57 file

Download all attachments as: .zip

Change History (8)

by iuliani, 15 years ago

Attachment: RO500002.000 added

ENC S57 file

comment:1 by tamas, 15 years ago

Component: defaultCSharpBindings
Owner: changed from warmerdam to tamas

comment:2 by Even Rouault, 15 years ago

Cc: hobus added

I'm ccying Howard, as it appears to be also broken in Python bindings

comment:3 by Even Rouault, 15 years ago

Cc: hobu added; hobus removed

comment:4 by tamas, 15 years ago

Status: newassigned

Fixed in trunk (r16310) and branch-1.6 (r16311)

This change is c# specific since array marshalling implementation highly depends on the target language.

I prefer use the return value instead of an out parameter so as to keep better match with the C/C++ API.

comment:5 by Even Rouault, 15 years ago

Component: CSharpBindingsPythonBindings
Owner: changed from tamas to hobu
Status: assignednew
Summary: GetFieldAsStringList c# wraperGetFieldAsStringList c# and Python wraper

Tamas, r16310 introduced a typo and an incorrect use of #else if instead of #elif. Fixed in r16312

in reply to:  5 comment:6 by tamas, 15 years ago

Replying to rouault:

Tamas, r16310 introduced a typo and an incorrect use of #else if instead of #elif. Fixed in r16312

Thanks for the change. It compiled for me though I've only tested with regards of the C# bindings. I hope one day the buildbot will alive ....

comment:7 by Even Rouault, 15 years ago

Milestone: 1.6.1
Resolution: fixed
Status: newclosed

For Python bindings, I've fixed GetFieldAsStringList, SetFieldStringList, GetFieldAsIntegerList and GetFieldAsDoubleList in trunk (r16564, r16566) and in branches/1.6 (r16565, r16567). Test added in r16568

Note: See TracTickets for help on using tickets.