[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [RFC] Mark deprecated functions with SVN_DEPRECATED / __attribute__((deprecated))

From: Arfrever Frehtes Taifersar Arahesis <arfrever.fta_at_gmail.com>
Date: Tue, 19 Aug 2008 13:14:06 +0200

2008-08-18 23:25:34 Greg Stein napisaƂ(a):
> Well, by definition, we don't need the developer to upgrade their
> software. They should be able to freely use the old API with no
> consequences. Thus, there is no rational reason for us to spam them.

Such messages shouldn't be treated as spam. They would be seen mostly only
by developers of software which uses Subversion libraries. People who don't
like warnings can use the '-w' compiler option.

> I like the idea of (...) the optional flag to just
> kill off deprecated functions entirely (...).

Do you plan to use something like this?:
Note the #ifndef and #endif.

======================== svn_x.h ========================

#ifndef SVN_NO_DEPRECATED

/** Like svn_do_something2(), but without the ability to ...
 *
 * @deprecated Provided for backwards compatibility with the 1.4 API.
 */
svn_error_t * SVN_DEPRECATED
svn_do_something(apr_pool_t *pool);

#endif

========================== x.c ==========================

#include "svn_x.h"
...

#ifndef SVN_NO_DEPRECATED

svn_error_t *
svn_do_something(apr_pool_t *pool)
{
  return svn_do_something2(pool);
}

#endif

> And yes, we can keep docstrings in the deprecated header so that
> people can figure out how to upgrade their calls.

Please don't move declarations of all deprecated functions to one header.
IMHO it would only create a disorder.

-- 
Arfrever Frehtes Taifersar Arahesis

Received on 2008-08-19 13:17:46 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.