Bug#548537: libjack-dev: functions described as deprecated should be marked as such

Adrian Knoth adi at drcomp.erfurt.thur.de
Sun Sep 27 10:05:20 UTC 2009


On Sun, Sep 27, 2009 at 12:12:32AM +0100, Darren Salt wrote:

Hi!

> Functions such as jack_client_new() are marked in *comments* as deprecated.
> They should be marked as deprecated such that the compiler will notice and
> emit appropriate warnings should any of them be used.

Though I agree that this would be nice, I don't see how to achieve it.

Have a look at the files in /usr/include/jack/, i.e. jack.h. They only
contain function prototypes, and the function itself is in libjack.so.

So you can't say "#warn deprecated" in the header file. One could say
"jack_client_new is deprecated" at runtime (a simple printf), and this
is exactly what jack2 does:

EXPORT jack_client_t* jack_client_new(const char* client_name)
{
    assert(JackGlobals::fOpenMutex);
    JackGlobals::fOpenMutex->Lock();
    jack_error("jack_client_new: deprecated");
    [..]


IOW: Running jackd2 is sufficient to get told when using deprecated
functions.

> (Reason: I've received a patch for xine-lib which makes it use the
> newer API, and I would probably have noticed and maybe even fixed this
> myself, or at least filed a bug report so that it didn't get
> forgotten, had I seen a "jack_client_new is deprecated" warning at
> compile time.)

Don't worry, jack_client_new is well supported by all versions of jackd
and will stay there for quite some time.

If you know a way how to issue a warning from a header file, please let
me know and I'll craft a patch.


Cheerio

-- 
mail: adi at thur.de  	http://adi.thur.de	PGP/GPG: key via keyserver





More information about the pkg-multimedia-maintainers mailing list