« Return to Thread: Regression in SWIG 1.3.39

Regression in SWIG 1.3.39

by nitro-4 :: Rate this Message:

Reply to Author | View in Thread

Hello,

after upgrading from 1.3.36 my wrappers broke, caused by the change below:

http://swig.svn.sourceforge.net/viewvc/swig/trunk/Lib/swig.swg?r1=11006&r2=11007

in particular the removal of SwigValueWrapper(const T& t) .

I am wrapping a function like

void func( MySmartPtr<SomeType> someParameter = 0 );

Which causes code like

SwigValueWrapper< MySmartPtr< SomeType > > arg1 = (SwigValueWrapper<  
MySmartPtr< SomeType > >) 0 ;

to be generated. This fails (under msvc 2008) with an error like

error C2440: 'conversion': cannot convert from 'int' to  
'SwigValueWrapper<T>'

This is obvious, as only the constructor of MySmartPtr accepts 0, the  
constructor of SwigValueWrapper doesn't accept 0 as a constructor argument.

Unless there's a compelling reason against this, I vote to reintroduce the  
SwigValueWrapper(const T& t) constructor.

Thanks,
-Matthias

------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Swig-user mailing list
Swig-user@...
https://lists.sourceforge.net/lists/listinfo/swig-user

 « Return to Thread: Regression in SWIG 1.3.39