> > > > > > > > > > > Re: the other recent discussions about getting too many > > > > callbacks. Instead of a dedicated function like this, we > > > > could make a set of generic functions: > > > > > > > > iio_backend_{g,s}et_property_{s,u}(8, 16, 32, 64}() > > > > > > > > > > Hmm interesting approach. I don't dislike it. Kind of a generic getter/setter > > > thingy. > > > We could then still have optional inline helpers that would call the generic > > > functions with the proper enum value. > > > > > > > that take an enum parameter for the property. This way, > > > > for each new property, we just have to add an enum member > > > > instead of creating a get/set callback pair. > > > > > > > > Unrelated to this particular case, but taking the idea even > > > > farther, we could also do the same with enable/disable > > > > functions. We talked before about cutting the number of > > > > callbacks in half by using a bool parameter instead of > > > > separate enable/disable callbacks. But we could cut it down > > > > even more by having an enum parameter for the thing we are > > > > enabling/disabling. > > > > > > If we don't get too strict about types it could even fall into the above u8 > > > category. > > > > > > Instead of lot of new simple ops we just grow an enum. > > > > Sure. For that matter, maybe try to just stick with 32-bit > > for everything to keep it simple. Probably will eventually > > need 64-bit for some things, but might be able to get away > > with avoiding 8 and 16-bit. > > > > Agreed. Anyways, nothing that I will take care in the near future (I would first like > for things to stabilize a bit). That said, if you want (or anybody else), feel free > to send the patches :) Definitely don't do the many size versions. Large signed integers are nice and flexible. Maybe just go s64 from the start. Jonathan > > - Nuno Sá >