libxkbcommon/include/xkbcommon
Ran Benita 467d7bb64e Implement missing xkb_state_ref and add return value
xkb_state_ref was missing.

Also modify the _ref functions to return the object instead of being
void. This is a useful idiom:

    struct my_object my_object_new(struct xkb_state *state)
    {
        [...]
        my_object->state = xkb_state_ref(state);
        [...]
    }

Essentially "taking" a reference, such that you don't forget to
increment it and it's one line less (see example in our own code).

A case could also be made for _unref to return the object or NULL, but
this is quite uncommon.

Signed-off-by: Ran Benita <ran234@gmail.com>

[daniels: Updated for xkb_keymap changes.]
2012-04-09 13:57:36 +01:00
..
xkbcommon.h Implement missing xkb_state_ref and add return value 2012-04-09 13:57:36 +01:00