[pulseaudio-discuss] [PATCH 2/2] format: Drop dependency on json-c
Arun Raghavan
arun at arunraghavan.net
Tue May 31 11:57:36 UTC 2016
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
More information about the pulseaudio-discuss
mailing list