swig problem

  • Thread starter =?ISO-8859-1?Q?=22klemens_letul=E9=22?=
  • Start date
?

=?ISO-8859-1?Q?=22klemens_letul=E9=22?=

Aloa,

I'm new to python as to swig... so my question goes here. I am using swig to
call a c function which returns a char*.

I do this:

....
i = 1
while i <= 2:
result, chainName = cgiServer.rpcGetTempParameterAttribut
("//firewall-input[" + str(i) + "]")
print chainName
i = i + 1
....

output is:
gprs-in
eth0-in
~~~

and should be:
gprs-in
eth0

..i file:
....
%cstring_bounded_output(char *result, 1024);

int rpcGetTempParameterAttribut(char *xpathUri, char *result);
....

I tried some approaches to write typemaps but failed. Could someone point me
in the right direction, so that i get two different instances for the
variable in the loop. I am sure this simple problem occured earlier, but I
could't find it in the archives!

Thanks a lot and greets, Klemens
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,262
Messages
2,571,311
Members
47,982
Latest member
DrewDemoss

Latest Threads

Top