On Tue, 24 May 2016, at 06:20 PM, Tanu Kaskinen wrote: > 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. Okay. > > + > > Â 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. Dropped. > > Â 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. Will evaluate, and drop the recounting if needed (if this is a pain to squash, I'll just do it as a separate patch on top of the series). > > Â > > @@ -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. The function itself is added in this commit, and I don't think this is important enough to merit moving between the two commits. -- Arun