[PATCH 2/2] format: Drop dependency on json-c

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

 



On Tue, 2016-04-26 at 17:47 +0530, arun at accosted.net wrote:
> diff --git a/src/pulse/json.h b/src/pulse/json.h
> index 6eba9a9..d799da0 100644
> --- a/src/pulse/json.h
> +++ b/src/pulse/json.h
> @@ -23,6 +23,8 @@
>  
>  #include 
>  
> +#define DOUBLE_IS_EQUAL(x, y) (((x) - (y)) < 0.000001 && ((x) - (y)) > -0.000001)

Stuff defined in headers should have the PA_ prefix.

> +
>  PA_C_DECL_BEGIN
>  
>  typedef enum {
> @@ -39,6 +41,7 @@ typedef enum {
>  typedef struct pa_json_object pa_json_object;
>  
>  pa_json_object* pa_json_parse(const char *str);
> +pa_json_object* pa_json_object_new_int(int i);

This appears to be unused.

>  pa_json_type pa_json_object_get_type(const pa_json_object *obj);
>  void pa_json_object_unref(pa_json_object *obj);

I didn't notice any place where pa_json_object_unref() couldn't be
replaced with pa_json_object_free(). The refcounting appears to be
unnecessary.

>  
> @@ -54,4 +57,6 @@ const pa_json_object* pa_json_object_get_object_member(const pa_json_object *o,
>  int pa_json_object_get_array_length(const pa_json_object *o);
>  const pa_json_object* pa_json_object_get_array_member(const pa_json_object *o, int index);
>  
> +bool pa_json_object_equal(const pa_json_object *o1, const pa_json_object *o2);

This addition would be better placed in the previous patch.

-- 
Tanu


[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux