Two other VS oddities... Did you meet these ? ( second one may
be a problem in minisip )
Mikael Magnusson
mikma264 at gmail.com
Fri Feb 2 23:07:05 CET 2007
Philippe Torrelli wrote:
> Hello
>
> I met other oddities from visual studio, one of wich I didn't met the first
> time I built a minisip textui :
>
> That is the prototype of the MPLugin::creator function :
> * Extern "C" <MRef MPlugin*>xxx( MRef<library *> lib)
>
> Visual studio refuses it because of the extern "C", stating that it won't
> return an object from a C routine. ( but it accepts if you return a pointer
> to an object , or remove the "C" ) .
> My opinion is it's ok to return a pointer from the creator function, and
> build the MRef from the affectation..
> ( so I change it into MPlugin *xx( MRef<library *> ) )
> Is it ok or am I missing something ?
>
I think it should work.
> B) This one I'm not sure, I would say it is a typo in minisip code, but if
> it's not (couldn't find a good reference ) , there is a big difference in
> VStudio STL implementation of list<xxx>::const_reverse_iterator.
>
> To go from the end to the beginning of the list the iterator has to be
> incremented here... So the code ( taken from SipRequest::addRoutes r3157 )
>
> for( i = routes.rbegin(); i != first; i-- ){
> const SipUri &route = *i;
> addRoute( route.getString() );
> }
> makes a crash, when
> for( i = routes.rbegin(); i != first; i++ ){
> const SipUri &route = *i;
> addRoute( route.getString() );
> }
> Does the job.
>
It's a bug. Now fixed in svn.
Thanks,
Mikael
More information about the Minisip-devel
mailing list