Actually, my $symname patch solves this context issue for me quite elegantly.  So, please ignore this followup.  :)

On 7/26/2011 2:38 PM, Bob Hood wrote:
On 7/26/2011 2:11 PM, Stefan Zager wrote:
Not sure about the $symname substitution, but I think there's a much more
straightforward way to fix your problem: declare two more specific typemaps:

%typemap(in) int *singles_array {

%typemap(in) int *doubles_array {

SWIG will apply these typemaps according to the parameter name in the

Thanks for the reply, Stefan, and that's good to know.

What about situations where you are wrapping and argument names are omitted (a
legal and common occurrence)?  The fragment I used was just an example; the
names provided to distinguish the formats.  The actual code I'm wrapping only
has the data type, no names.