Obsoleting RTL_CONSTASCII_USTRINGPARAM

Lubos Lunak l.lunak at suse.cz
Fri Feb 10 03:18:57 PST 2012


On Friday 10 of February 2012, Stephan Bergmann wrote:
> On 02/10/2012 11:30 AM, Lubos Lunak wrote:
> > +    /**
> > +     * @overload
> > +     * @since LibreOffice 3.6
> > +     */
> > +    oslGenericFunction SAL_CALL getFunctionSymbol( const
> > ::rtl::OUString& ustrFunctionSymbolName ) const +    {
> > +        return ( osl_getFunctionSymbol( m_Module,
> > ustrFunctionSymbolName.pData ) ); +    }
> > +
> >      /// @since LibreOffice 3.5
> >      oslGenericFunction SAL_CALL getFunctionSymbol(char const * name)
> > const { return osl_getAsciiFunctionSymbol(m_Module, name);
> >      }
> >
> > +    /**
> > +     * @overload
> > +     * @since LibreOffice 3.6
> > +     */
> > +    oslGenericFunction SAL_CALL getFunctionSymbol(char const * name) {
> > +        return osl_getAsciiFunctionSymbol(m_Module, name);
> > +    }
> > +
> >      operator oslModule() const
> >      {
> >          return m_Module;
>
> I guess its fine to just add the missing "const" to the existing
> OUString const & overload---or would that bring back the ambiguity?

 This is sal/, so the library needs to maintain binary compatibility, does it 
not? That requires adding the OUString overload rather than fixing the 
exiting function. I don't know if the const char* overload really needs the 
non-const variant as well, but it's a tiny inline function, so I added it for 
the symmetry, just in case.

-- 
 Lubos Lunak
 l.lunak at suse.cz


More information about the LibreOffice mailing list