[PATCH 1/2] xfree86: constify InputInfoPtr->type_name

Chase Douglas chase.douglas at canonical.com
Mon Jun 4 10:12:24 PDT 2012


On 05/28/2012 10:50 PM, Peter Hutterer wrote:
> This corresponds to XListInputDevice(3)'s "type" field (after being
> converted to an Atom). Input drivers use the XI_KEYBOARD and similar
> defines, even Wacom which falls out of the common defines uses constant
> strings here. The use-case for having this non-const is small.
> 
> Input ABI break technically, since we never freed this information anyway it
> is not a noticable change.

const in C is an API break, but is not an ABI break. This may cause
modules to fail to build, but any previously built modules will continue
to work without issue. It's a moot point, though, since I assume this
won't be backported to previous releases :).

> Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
> ---
>  hw/xfree86/common/xf86Xinput.h |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/hw/xfree86/common/xf86Xinput.h b/hw/xfree86/common/xf86Xinput.h
> index 1d4363a..6ccccf1 100644
> --- a/hw/xfree86/common/xf86Xinput.h
> +++ b/hw/xfree86/common/xf86Xinput.h
> @@ -98,7 +98,7 @@ typedef struct _InputInfoRec {
>      int fd;
>      DeviceIntPtr dev;
>      pointer private;
> -    char *type_name;
> +    const char *type_name;
>      InputDriverPtr drv;
>      pointer module;
>      XF86OptionPtr options;

Reviewed-by: Chase Douglas <chase.douglas at canonical.com>


More information about the xorg-devel mailing list