GMLC-TDC / HELICS

Hierarchical Engine for Large-scale Infrastructure Co-Simulation (HELICS)
https://docs.helics.org/en/latest/
BSD 3-Clause "New" or "Revised" License
127 stars 40 forks source link

Java SWIG string interface passed immutable string as input argument #234

Closed kdheepak closed 6 years ago

kdheepak commented 6 years ago

This could potentially solve it.

// Add the following line to `swig/java/helicsJava.i`
%apply(char *STRING, int LENGTH) { (char *str, int maxlen) };
kdheepak commented 6 years ago

It looks like this is already there, but just needs to be altered slightly.

kdheepak commented 6 years ago

This SO answer is really useful as well for this - https://stackoverflow.com/a/11584600

phlptp commented 6 years ago

It seems like this is resolved for now, but we should revisit the API for the interfaces for HELICS 2.0