mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-05 13:29:57 -05:00
json: improve supported numbers
Use 64bit signed integers and fix double value conversion. Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/525>
This commit is contained in:
parent
02027518af
commit
1df4a311d4
3 changed files with 58 additions and 61 deletions
|
|
@ -18,6 +18,7 @@
|
|||
***/
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#define PA_DOUBLE_IS_EQUAL(x, y) (((x) - (y)) < 0.000001 && ((x) - (y)) > -0.000001)
|
||||
|
||||
|
|
@ -40,7 +41,7 @@ void pa_json_object_free(pa_json_object *obj);
|
|||
|
||||
/* All pointer members that are returned are valid while the corresponding object is valid */
|
||||
|
||||
int pa_json_object_get_int(const pa_json_object *o);
|
||||
int64_t pa_json_object_get_int(const pa_json_object *o);
|
||||
double pa_json_object_get_double(const pa_json_object *o);
|
||||
bool pa_json_object_get_bool(const pa_json_object *o);
|
||||
const char* pa_json_object_get_string(const pa_json_object *o);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue