On 2011-04-12 22:54-0700 Alan W. Irwin wrote:
> I. I have noticed unbalanced parentheses in the following typemap in
> /usr/share/swig1.3/java/typemaps.i on my Debian Squeeze system with a
> swig package version of 1.3.40-3.
>
> %typemap(directorin,descriptor=JNIDESC) TYPE &OUTPUT
> %{ *(($&1_ltype) $input = &$1; %}
>
> Should that read
>
> %typemap(directorin,descriptor=JNIDESC) TYPE &OUTPUT
> %{ *(($&1_ltype) $input) = &$1; %}
>
> to balance the parentheses like is done for other similar typemaps
> in that file?
Issue II. was answered previously, but nobody appears to have looked
at issue I. yet. I suspect this is probably a bug because I doubt
unbalanced parentheses are correct, but I would like confirmation of
that from swig experts here.
Alan
__________________________
Alan W. Irwin
Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).
Programming affiliations with the FreeEOS equation-of-state implementation
for stellar interiors (freeeos.sf.net); PLplot scientific plotting software
package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of
Linux Links project (loll.sf.net); and the Linux Brochure Project
(lbproject.sf.net).
__________________________
Linux-powered Science
__________________________

Thread view

I. I have noticed unbalanced parentheses in the following typemap in
/usr/share/swig1.3/java/typemaps.i on my Debian Squeeze system with a
swig package version of 1.3.40-3.
%typemap(directorin,descriptor=JNIDESC) TYPE &OUTPUT
%{ *(($&1_ltype) $input = &$1; %}
Should that read
%typemap(directorin,descriptor=JNIDESC) TYPE &OUTPUT
%{ *(($&1_ltype) $input) = &$1; %}
to balance the parentheses like is done for other similar typemaps
in that file?
II. Another possible issue with that file is some code blocks inside
typemaps that are inside %define ... %undef blocks are delimited by
%{
%}
(as above) while others are delimited by
{
}
e.g.,
%typemap(argout) TYPE *OUTPUT, TYPE &OUTPUT
{
JNITYPE jvalue = (JNITYPE)temp$argnum;
JCALL4(Set##JAVATYPE##ArrayRegion, jenv, $input, 0, 1, &jvalue);
}
Should those two distinct delimiter directives be used or is that
another issue with this file?
I am not that familiar with swig syntax so my apologies in advance
if these inconsistencies I am noticing in java/typemaps.i
are meant to be that way.
Alan
__________________________
Alan W. Irwin
Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).
Programming affiliations with the FreeEOS equation-of-state implementation
for stellar interiors (freeeos.sf.net); PLplot scientific plotting software
package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of
Linux Links project (loll.sf.net); and the Linux Brochure Project
(lbproject.sf.net).
__________________________
Linux-powered Science
__________________________

On 2011-04-12 22:54-0700 Alan W. Irwin wrote:
> I. I have noticed unbalanced parentheses in the following typemap in
> /usr/share/swig1.3/java/typemaps.i on my Debian Squeeze system with a
> swig package version of 1.3.40-3.
>
> %typemap(directorin,descriptor=JNIDESC) TYPE &OUTPUT
> %{ *(($&1_ltype) $input = &$1; %}
>
> Should that read
>
> %typemap(directorin,descriptor=JNIDESC) TYPE &OUTPUT
> %{ *(($&1_ltype) $input) = &$1; %}
>
> to balance the parentheses like is done for other similar typemaps
> in that file?
Issue II. was answered previously, but nobody appears to have looked
at issue I. yet. I suspect this is probably a bug because I doubt
unbalanced parentheses are correct, but I would like confirmation of
that from swig experts here.
Alan
__________________________
Alan W. Irwin
Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).
Programming affiliations with the FreeEOS equation-of-state implementation
for stellar interiors (freeeos.sf.net); PLplot scientific plotting software
package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of
Linux Links project (loll.sf.net); and the Linux Brochure Project
(lbproject.sf.net).
__________________________
Linux-powered Science
__________________________

On 30/04/11 23:06, Alan W. Irwin wrote:
> On 2011-04-12 22:54-0700 Alan W. Irwin wrote:
>
>> I. I have noticed unbalanced parentheses in the following typemap in
>> /usr/share/swig1.3/java/typemaps.i on my Debian Squeeze system with a
>> swig package version of 1.3.40-3.
>>
>> %typemap(directorin,descriptor=JNIDESC) TYPE&OUTPUT
>> %{ *(($&1_ltype) $input =&$1; %}
>>
>> Should that read
>>
>> %typemap(directorin,descriptor=JNIDESC) TYPE&OUTPUT
>> %{ *(($&1_ltype) $input) =&$1; %}
>>
>> to balance the parentheses like is done for other similar typemaps
>> in that file?
>
> Issue II. was answered previously, but nobody appears to have looked
> at issue I. yet. I suspect this is probably a bug because I doubt
> unbalanced parentheses are correct, but I would like confirmation of
> that from swig experts here.
>
These typemaps are incomplete and have never been used. They will be
removed in the next version to remove confusion.
William