Two other VS oddities... Did you meet these ? ( second one may be a
problem in minisip )
Philippe Torrelli
philippe.torrelli at alcatel-lucent.fr
Fri Feb 2 19:17:19 CET 2007
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 ?
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.
Philippe Torrelli
More information about the Minisip-devel
mailing list