On Wed, Apr 18, 2012 at 11:41:31AM +0100, Bastien Nocera wrote: > On Wed, 2012-04-18 at 14:57 +1000, Peter Hutterer wrote: > > Add a new type WacomMatch that holds device matching information. > > A WacomDevice in libwacom now has a bunch of possible matches that can be > > queried. The first possible match is the default match unless the device was > > updated otherwise (e.g. libwacom_device_new_from_path will set the correct > > match). > > > > Previous calls to get bustype, vendor_id, product_id now return the set > > match's values. > > > > Basic refcounting was added to the WacomDevice to allow for the device to be > > stored multiple times in the device hashtable. > > > > Signed-off-by: Peter Hutterer <[email protected]> > > --- [...] > > + device->matches[device->nmatches-1] = libwacom_copy_match(&match); > > + device->match = device->nmatches - 1; > > + g_free(newmatch); > > } > > > > int libwacom_get_vendor_id(WacomDevice *device) > > { > > - return device->vendor_id; > > + return device->matches[device->match]->vendor_id; > > } > > Add guards around public API.
I'm not sure what you mean here. Asserts? all other comments addressed in v2. Cheers, Peter ------------------------------------------------------------------------------ For Developers, A Lot Can Happen In A Second. Boundary is the first to Know...and Tell You. Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! http://p.sf.net/sfu/Boundary-d2dvs2 _______________________________________________ Linuxwacom-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel
