[PATCH v3] json: fix interface locale dependency

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I'm trying to get a optimized and reusable version of the code fixing
libvirt's locale dependency.

This time I'm sending two versions of the patch:

 v1) adds static function virNumberToStr() that converts one number to
     string base on a parameter defining the format. For float, double
     and long double there are functions that should be used in the code.

 v2) adds function for converting only double to string. This version has
     also a little bit differently separated the conditional code.

I personally like the second version better. for two reasons. 1) it looks
better, 2) there is no need for special-formatting with C locale unless
the result is being parsed by machine in which case the '%lf' is always
sufficient.

Martin Kletzander (1):
  json: fix interface locale dependency

 bootstrap.conf           |    1 +
 configure.ac             |    2 +-
 src/libvirt_private.syms |    3 +
 src/util/json.c          |    2 +-
 src/util/util.c          |  137 ++++++++++++++++++++++++++++++++++++++++++++++
 src/util/util.h          |    7 ++
 6 files changed, 150 insertions(+), 2 deletions(-)

--
1.7.8.6

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]