iwd.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [PATCH] json: update internal type definition to match JSMN
@ 2022-11-02 18:46 James Prestwood
  2022-11-02 18:50 ` James Prestwood
  0 siblings, 1 reply; 3+ messages in thread
From: James Prestwood @ 2022-11-02 18:46 UTC (permalink / raw)
  To: iwd; +Cc: James Prestwood

Fixes: ceda955ba7 ("shared: Update JSMN to latest version")
---
 src/json.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/json.h b/src/json.h
index c6220667..8cf2ba03 100644
--- a/src/json.h
+++ b/src/json.h
@@ -27,10 +27,10 @@ struct json_iter;
  */
 enum json_type {
 	JSON_UNDEFINED = 0,
-	JSON_OBJECT = 1,
-	JSON_ARRAY = 2,
-	JSON_STRING = 3,
-	JSON_PRIMITIVE = 4
+	JSON_OBJECT = 1 << 0,
+	JSON_ARRAY = 1 << 1,
+	JSON_STRING = 1 << 2,
+	JSON_PRIMITIVE = 1 << 4,
 };
 
 enum json_flag {
-- 
2.34.3


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] json: update internal type definition to match JSMN
  2022-11-02 18:46 [PATCH] json: update internal type definition to match JSMN James Prestwood
@ 2022-11-02 18:50 ` James Prestwood
  2022-11-02 20:04   ` Denis Kenzior
  0 siblings, 1 reply; 3+ messages in thread
From: James Prestwood @ 2022-11-02 18:50 UTC (permalink / raw)
  To: iwd

On Wed, 2022-11-02 at 11:46 -0700, James Prestwood wrote:
> Fixes: ceda955ba7 ("shared: Update JSMN to latest version")
> ---
>  src/json.h | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/src/json.h b/src/json.h
> index c6220667..8cf2ba03 100644
> --- a/src/json.h
> +++ b/src/json.h
> @@ -27,10 +27,10 @@ struct json_iter;
>   */
>  enum json_type {
>         JSON_UNDEFINED = 0,
> -       JSON_OBJECT = 1,
> -       JSON_ARRAY = 2,
> -       JSON_STRING = 3,
> -       JSON_PRIMITIVE = 4
> +       JSON_OBJECT = 1 << 0,
> +       JSON_ARRAY = 1 << 1,
> +       JSON_STRING = 1 << 2,
> +       JSON_PRIMITIVE = 1 << 4,

Whoops, this should be 1 << 3. I can send v2 or just fix this up when
applying?

>  };
>  
>  enum json_flag {



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] json: update internal type definition to match JSMN
  2022-11-02 18:50 ` James Prestwood
@ 2022-11-02 20:04   ` Denis Kenzior
  0 siblings, 0 replies; 3+ messages in thread
From: Denis Kenzior @ 2022-11-02 20:04 UTC (permalink / raw)
  To: James Prestwood, iwd

Hi James,

On 11/2/22 13:50, James Prestwood wrote:
> On Wed, 2022-11-02 at 11:46 -0700, James Prestwood wrote:
>> Fixes: ceda955ba7 ("shared: Update JSMN to latest version")
>> ---
>>   src/json.h | 8 ++++----
>>   1 file changed, 4 insertions(+), 4 deletions(-)
>>
> 
> Whoops, this should be 1 << 3. I can send v2 or just fix this up when
> applying?
> 

I fixed this up and applied.

Regards,
-Denis

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-11-02 20:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-02 18:46 [PATCH] json: update internal type definition to match JSMN James Prestwood
2022-11-02 18:50 ` James Prestwood
2022-11-02 20:04   ` Denis Kenzior

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).