Hi

2011/10/12 Peter Hutterer <peter.hutte...@who-t.net>:
> There's nothing wrong with using void*, other than that you _always_ have to
> typecast when you want to use it. char* you only need to typecast for other
> formats. In this case, you'll probably notice that XGetDeviceProperty
> returns a unsigned char* too.
> (uchar is actually preferrable over char for buffers too)

Just my 2 cents. I'd vote for 'void*'.

* for the caller it is much more convenient (no need for typecast)
* The callee (get/set) can just use my suggested _get_size function
together with memcpy and some pointer arithmetic
* Typecasts, as far as I can see, are only needed for the get_param function
* without knowing the reason for XGetDeviceProperty returning char*,
we cannot tell if it is reasonable to do so
* void* can easily be inspected using 'x' (examine) in gdb

Eduard

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2d-oct
_______________________________________________
Linuxwacom-devel mailing list
Linuxwacom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel

Reply via email to