William A. Hoffman | 26 Mar 14:47 2004
Picon

cvs swig does not build with MS or Borland

The dashboard for swig has been failing on windows
for several days now:

http://public.kitware.com/dashboard.php?name=public

-Bill

Luigi Ballabio | 26 Mar 15:04 2004
Picon

Re: SRAPI and std::vector

Hi all,

On 2004.03.22 21:08, John Lenz wrote:
>> While I would like to remove replication, I have to admin that a few
>> things in the above bother me, namely:
>> 
>> a) one is forced (just once, I admit) to write the union of all
>>   instructions that are needed for each language.  For example,
>>   the fact that the Python API requests reference-count management
>>   makes it necessary to add SWIG_Vector_DecrementRef() macro calls.
>> 
>>   However, I admit this is just a very minor problem.
> 
> In defense of the DecrementRef stuff, any language that uses  
> reference counting will need to implement the DecrementRef.  I don't  
> really see the DecrementRef as a Python specific thing.

Well, I might have been biased by the fact that we have std::vector  
typemaps for Guile, MzScheme, Perl, Python, Ruby and TCL, and Python is  
the only language with reference counting :)  But as I wrote, this was  
a very minor point, and definitely not one that I would raise against  
your API.

>> b) More serious is that I'm not really sure that one can write
>>   code which is truly language-independent.  The most obvious
>>   example is that Scheme typemaps for std::vector now accepts
>>   both Scheme vectors (random-access) and lists (single-linked).
>>   For the latter, the pattern
>> 
>>    for (i=0; i<size; i++)
(Continue reading)

Luigi Ballabio | 26 Mar 15:09 2004
Picon

Types with typemaps (was Re: SRAPI and std::vector)

On 2004.03.22 22:33, Marcelo Matus wrote:
> There is no need to call the old 'specialization' macro helpers, and
> you can combine as many types as you want:
> 
> %template() std::pair<std::string, int>;
> %template() std::list<std::pair<std:string, int> >;

Marcelo,
	first of all: very nice bit of coding :)
I have a question though: how about types for which a typemap is  
defined? I guess I have to specialize swigpy::as<Foo> and cousins in  
order to plug the typemap code into the typemap for vector<Foo>. How do  
I go about it?

Thanks,
	Luigi

Marcelo Matus | 26 Mar 22:32 2004
Picon

Re: Types with typemaps (was Re: SRAPI and std::vector)

Luigi Ballabio wrote:

> On 2004.03.22 22:33, Marcelo Matus wrote:
>
>> There is no need to call the old 'specialization' macro helpers, and
>> you can combine as many types as you want:
>>
>> %template() std::pair<std::string, int>;
>> %template() std::list<std::pair<std:string, int> >;
>
>
> Marcelo,
>     first of all: very nice bit of coding :)

Thanks, and the most incredible part is how few changes were needed in 
the swig core.

> I have a question though: how about types for which a typemap is  
> defined? I guess I have to specialize swigpy::as<Foo> and cousins in  
> order to plug the typemap code into the typemap for vector<Foo>. How 
> do  I go about it?
>

well, here are the cases:

1.- If it is a simple class, that is using the SWIGTYPE typemaps, it 
should work fine, since
     there are an implicit swigpy::as/from<SWIGTYPE> methods for that, 
which use the old
     SWIG_ConvertPtr, SWIG_NewPointerObj methods.
(Continue reading)

Marcelo Matus | 29 Mar 13:30 2004
Picon

If you can, test the new STL support in Python

Hello:

As has been mentioned before in the list, the STL support
in python, and in general the entire Swig-python library,
has been largely modified.

For the STL part, swig now uses some templates,
and since the template support "level" changes from compiler
to compiler, is better we test the new implementation as
much as possible.

So, if you can, and in special if you have a non-common
combination of compiler and platform, please try
the latest CVS version.

See the CHANGES.current file for more details about the
new features.

Marcelo

William S Fulton | 29 Mar 22:34 2004
Picon

Re: If you can, test the new STL support in Python

Marcelo Matus wrote:
> Hello:
> 
> As has been mentioned before in the list, the STL support
> in python, and in general the entire Swig-python library,
> has been largely modified.
> 
> For the STL part, swig now uses some templates,
> and since the template support "level" changes from compiler
> to compiler, is better we test the new implementation as
> much as possible.
> 
> So, if you can, and in special if you have a non-common
> combination of compiler and platform, please try
> the latest CVS version.
> 
> See the CHANGES.current file for more details about the
> new features.
> 
> 
> Marcelo
> 
> 

Everything okay on Cygwin except this...

Checking testcase complextest (with run test) under python
complextest_wrap.c:853:21: complex.h: No such file or directory
complextest_wrap.c:856: error: syntax error before "float_complex"
complextest_wrap.c:856: warning: data definition has no type or storage class
(Continue reading)

Marcelo Matus | 29 Mar 23:28 2004
Picon

Re: If you can, test the new STL support in Python

Ok, the complex test has two versions, for C and C++.

This means that the Cygwin compiler has no support for the
complex type under C.

And as that could be the same in many other cases, is better
to disable the test for plain C.

Still, people who has a new C compiler, with complex support,
will be able to use the wrap.

Marcelo

William S Fulton wrote:

> Everything okay on Cygwin except this...
>
> Checking testcase complextest (with run test) under python
> complextest_wrap.c:853:21: complex.h: No such file or directory
> complextest_wrap.c:856: error: syntax error before "float_complex"
> complextest_wrap.c:856: warning: data definition has no type or 
> storage class
> complextest_wrap.c:857: error: syntax error before "double_complex"
> complextest_wrap.c:857: warning: data definition has no type or 
> storage class
> complextest_wrap.c:860: error: syntax error before "Conj"
> complextest_wrap.c:860: error: syntax error before "a"
> complextest_wrap.c: In function `Conj':
> complextest_wrap.c:862: error: `a' undeclared (first use in this 
> function)
(Continue reading)

Matthias Koeppe | 28 Mar 22:04 2004

[Swig-CVS] commit SWIG/Runtime Makefile.am

Attachment: application/octet-stream, 234 bytes
SourceForge.net | 29 Mar 21:50 2004
Picon
Picon

[ swig-Bugs-925555 ] Unable to parse templatedClass<size -1>

Bugs item #925555, was opened at 2004-03-29 11:49
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=101645&aid=925555&group_id=1645

Category: parsing
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: Unable to parse templatedClass<size -1>

Initial Comment:
Every time Swig runs into a template declaration such as:

 template<int __stride, class __elementTypeSequence,
class __dataPtrType, class __elementType>
        inline const ThisType & ConcatenationOf(const
vctFixedLengthConstSequenceBase<_size - 1, __stride,
__elementTypeSequence, __dataPtrType> & other,

__elementType last);

it complains:

/home/stomach/anton/devel/cisst/libs/include/cisstVector/vctFixedLengthSequenceBase.h:287:
Error: Syntax error in input.

Basically, it seems impossible to use an operation as a
template parameter.  In my case, _size -1.

anton <at> cs.jhu.edu

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=101645&aid=925555&group_id=1645

Marcelo Matus | 28 Mar 16:05 2004

[Swig-CVS] commit SWIG/Source/Modules lang.cxx

Attachment: application/octet-stream, 196 bytes

Gmane