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
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