[PATCH 10/16] dmx: Fix XSetExtensionErrorHandler calls to agree on constness.

Alan Coopersmith alan.coopersmith at oracle.com
Thu May 27 07:33:07 PDT 2010


Jamey Sharp wrote:
> Hi Alan! Would you mind reviewing this xserver patch for me? It's just
> getting DMX to match Xlib's types, which you're more familiar with
> than most people. It is unfortunate that the actual call to
> XSetExtensionErrorHandler fell just outside the diff context...
> 
> Thanks,
> Jamey
> 
> On Tue, May 25, 2010 at 4:53 PM, Jamey Sharp <jamey at minilop.net> wrote:
>> Signed-off-by: Jamey Sharp <jamey at minilop.net>
>> ---
>>  hw/dmx/input/dmxcommon.c    |    2 +-
>>  hw/dmx/input/dmxinputinit.c |    4 ++--
>>  hw/dmx/input/dmxinputinit.h |    4 ++--
>>  3 files changed, 5 insertions(+), 5 deletions(-)
>>
>> diff --git a/hw/dmx/input/dmxcommon.c b/hw/dmx/input/dmxcommon.c
>> index da5b778..2f23d1c 100644
>> --- a/hw/dmx/input/dmxcommon.c
>> +++ b/hw/dmx/input/dmxcommon.c
>> @@ -370,7 +370,7 @@ void dmxCommonOthGetInfo(DevicePtr pDev, DMXLocalInitInfoPtr info)
>>     Display              *display = priv->display;
>>     int                  num;
>>     int                  i, j, k;
>> -    int                  (*handler)(Display *, char *, char *);
>> +    XextErrorHandler     handler;
>>
>>     if (!display && !(display = XOpenDisplay(dmxInput->name)))
>>         return;
>> diff --git a/hw/dmx/input/dmxinputinit.c b/hw/dmx/input/dmxinputinit.c
>> index 9da4aba..1662d0f 100644
>> --- a/hw/dmx/input/dmxinputinit.c
>> +++ b/hw/dmx/input/dmxinputinit.c
>> @@ -827,7 +827,7 @@ static void dmxPopulateLocal(DMXInputInfo *dmxInput, dmxArg a)
>>     }
>>  }
>>
>> -int dmxInputExtensionErrorHandler(Display *dsp, char *name, char *reason)
>> +int dmxInputExtensionErrorHandler(Display *dsp, _Xconst char *name, _Xconst char *reason)
>>  {
>>     return 0;
>>  }
>> @@ -840,7 +840,7 @@ static void dmxInputScanForExtensions(DMXInputInfo *dmxInput, int doXI)
>>     int                  num;
>>     int                  i, j;
>>     DMXLocalInputInfoPtr dmxLocal;
>> -    int                  (*handler)(Display *, char *, char *);
>> +    XextErrorHandler     handler;
>>
>>     if (!(display = XOpenDisplay(dmxInput->name))) return;
>>
>> diff --git a/hw/dmx/input/dmxinputinit.h b/hw/dmx/input/dmxinputinit.h
>> index 2e625cf..5a4a410 100644
>> --- a/hw/dmx/input/dmxinputinit.h
>> +++ b/hw/dmx/input/dmxinputinit.h
>> @@ -276,8 +276,8 @@ extern void dmxKeyboardKbdCtrlProc(DeviceIntPtr pDevice, KeybdCtrl *ctrl);
>>  extern void dmxKeyboardBellProc(int percent, DeviceIntPtr pDevice,
>>                                 pointer ctrl, int unknown);
>>
>> -extern int  dmxInputExtensionErrorHandler(Display *dsp, char *name,
>> -                                          char *reason);
>> +extern int  dmxInputExtensionErrorHandler(Display *dsp, _Xconst char *name,
>> +                                          _Xconst char *reason);
>>
>>  extern int          dmxInputDetach(DMXInputInfo *dmxInput);
>>  extern void         dmxInputDetachAll(DMXScreenInfo *dmxScreen);
>> --
>> 1.7.0

Reviewed-by: Alan Coopersmith <alan.coopersmith at oracle.com>

-- 
	-Alan Coopersmith-        alan.coopersmith at oracle.com
	 Oracle Solaris Platform Engineering: X Window System



More information about the xorg-devel mailing list