Opened 13 years ago

Closed 13 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 13 years ago.
ENC S57 file

Download all attachments as: .zip

Change History (8)

Changed 13 years ago by iuliani

Attachment: RO500002.000 added

ENC S57 file

comment:1 Changed 13 years ago by tamas

Component: defaultCSharpBindings
Owner: changed from warmerdam to tamas

comment:2 Changed 13 years ago by Even Rouault

Cc: hobus added

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

comment:3 Changed 13 years ago by Even Rouault

Cc: hobu added; hobus removed

comment:4 Changed 13 years ago by tamas

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 Changed 13 years ago by Even Rouault

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

comment:6 in reply to:  5 Changed 13 years ago by tamas

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 Changed 13 years ago by Even Rouault

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.