ovs: add backward compatibility wrapper for json_object_foreach() macro

This commit is contained in:
Thomas Haller
2017-10-31 20:02:48 +01:00
parent b84f63265f
commit 76b913a210

View File

@@ -43,6 +43,14 @@
index++) index++)
#endif #endif
/* Added in Jansson v2.3 (released Jan 27 2012) */
#ifndef json_object_foreach
#define json_object_foreach(object, key, value) \
for(key = json_object_iter_key(json_object_iter(object)); \
key && (value = json_object_iter_value(json_object_key_to_iter(key))); \
key = json_object_iter_key(json_object_iter_next(object, json_object_key_to_iter(key))))
#endif
/*****************************************************************************/ /*****************************************************************************/
typedef struct { typedef struct {