x11 icon indicating copy to clipboard operation
x11 copied to clipboard

chore: Replace deprecated cuchar usage with char

Open marcusramberg opened this issue 2 years ago • 4 comments
trafficstars

marcusramberg avatar May 07 '23 14:05 marcusramberg

Many of these should be uint8 though.

Araq avatar May 10 '23 04:05 Araq

Many of these should be uint8 though.

I'll try to understand the underlying code better and update my PR.

marcusramberg avatar May 10 '23 06:05 marcusramberg

Many of these should be uint8 though.

Aren't all of these defined as unsigned char in the spec? And anyway is there a practical difference between uint8 vs char here? I can see the argument for (for example) length field in XValuatorState should have been defined as uint8, but the struct really is defined as

typedef struct {
    unsigned char class;
    unsigned char length;
    unsigned char num_valuators;
    unsigned char mode;
    int *valuators;
} XValuatorState;

Plus as is, cuchar is just char, so this PR isn't introducing any new bugs as far as I can tell

eclairevoyant avatar Jun 04 '23 14:06 eclairevoyant

It doesn't introduce new bugs but it doesn't clean up the types either.

Araq avatar Jun 05 '23 06:06 Araq