From: William S Fulton <wsf@fu...> - 2011-12-09 06:43:38
On 08/12/11 10:58, Olly Betts wrote:
> On Thu, Dec 08, 2011 at 09:54:31AM +0000, William S Fulton wrote:
>> Your code is exhibiting the old behaviour, so you probably just need to
>> recompile. Change is rev 12849 and you need to make sure that the latest
>> typemap.c is compiled.
> Oh dear, I'm an idiot - that was exactly it. Sorry for the noise.
>> The code should be:
>> arg9 =&temp82;
>> arg10 =&temp92;
>> arg11 =&temp102; // the code generated for this was arg20 =
>> &temp102; and arg20 does not exist.
>> int arg11_ptr = 0; // Was arg20_ptr
>> The tempX variables are named tempX plus the argument number (2) as
>> suffix. All temp variables have the argument number automatically added
>> as a suffix so that the temp variable can be used in more than one
> Hmm, so what if X goes up to 11 and so does the argument number?
> Couldn't we end up with temp111 twice (from "temp"+"11"+"1" and
Well yes, I think you are right.
> If that's an issue, we can presumably just insert an underscore between
> the two numbers to differentiate such cases.
I'm sure that whatever mangling we put in place, it will be possible to
find some corner case that will break it. Fortunately duplicate
definitions of the variables will alert a user via compiler errors and
hence problems can be easily circumvented by the typemap author changing
the typemap variable names. I havn't seen any such temporary variable
naming in the SWIG library, so don't think this will be an issue in