Re: RFC version issues

* Ross McFarland <rwmcfa1 neces com> [2004-01-23 05:18]:
2) add two new functions, for example check_bound_version and
get_bound_version_info. these would return the versions Gtk2
was compiled against and therefore what is available to the

Sounds like the only logical option.

optionally warning messages could be printed saying not to use
check_version and get_version_info b/c they're almost useless.
(they could be useful if you're trying to work around bugs in
gtk+ so this probably isn't a good idea)

How about using warnings::register and putting these messages
into warnings::warnif()? That way I could say

    no warnings 'gtk2-useless';
    # or
    no warnings 'gtk2-deprecated';
    # or even (to get the typical console messages to shut up)
    no warnings 'gtk2-assert';

An obvious advantage is that using pragma gets us lexical scoping
for the warnings at no extra cost:

        do {
            no warnings 'gtk2-useless';
        } == 222
    ) {
        # work around some bug
    else {
        # just do it normally
"If you can't laugh at yourself, you don't take life seriously enough."

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]