SWIG

N

Norman Young

Hi,

Forgive me that the following aren't really Python questions but SWIG
questions:

1) I'm trying to SWIG a function that looks like this:

void print(ofstream out);

The problem is that the variable "out" is a keyword in the target
language (C#, actually). Thus, I want the variable to be renamed to
something like, "outStream". I've tried various syntatical variations
on the %rename directive with little success. Without having to
modify the source C++ file, how do I achieve this seemingly simply
rename?

2) The library I'm trying to SWIG contains the following #defines:

#define OFBool bool
#define OFTrue true
#define OFFalse false

How do I get SWIG to use "bool" instead of "OFBool" when generating
the wrapper in the target language?

Thanks.

Norman
 

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

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,190
Members
46,740
Latest member
AdolphBig6

Latest Threads

Top