mirror of
https://github.com/json-c/json-c.git
synced 2026-03-26 00:19:07 +08:00
clang-format the files
This commit is contained in:
@@ -20,14 +20,13 @@
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
||||
|
||||
#ifndef JSON_OBJECT_ITERATOR_H
|
||||
#define JSON_OBJECT_ITERATOR_H
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
#ifndef JSON_EXPORT
|
||||
#if defined(_MSC_VER)
|
||||
#if defined(_MSC_VER)
|
||||
#define JSON_EXPORT __declspec(dllexport)
|
||||
#else
|
||||
#define JSON_EXPORT extern
|
||||
@@ -47,17 +46,16 @@ struct json_object_iter_info_;
|
||||
* The opaque iterator that references a name/value pair within
|
||||
* a JSON Object instance or the "end" iterator value.
|
||||
*/
|
||||
struct json_object_iterator {
|
||||
const void* opaque_;
|
||||
struct json_object_iterator
|
||||
{
|
||||
const void *opaque_;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* forward declaration of json-c's JSON value instance structure
|
||||
*/
|
||||
struct json_object;
|
||||
|
||||
|
||||
/**
|
||||
* Initializes an iterator structure to a "default" value that
|
||||
* is convenient for initializing an iterator variable to a
|
||||
@@ -80,8 +78,7 @@ struct json_object;
|
||||
*
|
||||
* @return json_object_iterator
|
||||
*/
|
||||
JSON_EXPORT struct json_object_iterator
|
||||
json_object_iter_init_default(void);
|
||||
JSON_EXPORT struct json_object_iterator json_object_iter_init_default(void);
|
||||
|
||||
/** Retrieves an iterator to the first pair of the JSON Object.
|
||||
*
|
||||
@@ -114,8 +111,7 @@ json_object_iter_init_default(void);
|
||||
*
|
||||
* @endcode
|
||||
*/
|
||||
JSON_EXPORT struct json_object_iterator
|
||||
json_object_iter_begin(struct json_object* obj);
|
||||
JSON_EXPORT struct json_object_iterator json_object_iter_begin(struct json_object *obj);
|
||||
|
||||
/** Retrieves the iterator that represents the position beyond the
|
||||
* last pair of the given JSON Object instance.
|
||||
@@ -145,8 +141,7 @@ json_object_iter_begin(struct json_object* obj);
|
||||
* (i.e., NOT the last pair, but "beyond the last
|
||||
* pair" value)
|
||||
*/
|
||||
JSON_EXPORT struct json_object_iterator
|
||||
json_object_iter_end(const struct json_object* obj);
|
||||
JSON_EXPORT struct json_object_iterator json_object_iter_end(const struct json_object *obj);
|
||||
|
||||
/** Returns an iterator to the next pair, if any
|
||||
*
|
||||
@@ -163,9 +158,7 @@ json_object_iter_end(const struct json_object* obj);
|
||||
* of json_object_iter_end() for the same JSON Object
|
||||
* instance.
|
||||
*/
|
||||
JSON_EXPORT void
|
||||
json_object_iter_next(struct json_object_iterator* iter);
|
||||
|
||||
JSON_EXPORT void json_object_iter_next(struct json_object_iterator *iter);
|
||||
|
||||
/** Returns a const pointer to the name of the pair referenced
|
||||
* by the given iterator.
|
||||
@@ -182,9 +175,7 @@ json_object_iter_next(struct json_object_iterator* iter);
|
||||
* deleted or modified, and MUST NOT be modified or
|
||||
* freed by the user.
|
||||
*/
|
||||
JSON_EXPORT const char*
|
||||
json_object_iter_peek_name(const struct json_object_iterator* iter);
|
||||
|
||||
JSON_EXPORT const char *json_object_iter_peek_name(const struct json_object_iterator *iter);
|
||||
|
||||
/** Returns a pointer to the json-c instance representing the
|
||||
* value of the referenced name/value pair, without altering
|
||||
@@ -205,9 +196,8 @@ json_object_iter_peek_name(const struct json_object_iterator* iter);
|
||||
* the JSON Null value as a NULL json_object instance
|
||||
* pointer.
|
||||
*/
|
||||
JSON_EXPORT struct json_object*
|
||||
json_object_iter_peek_value(const struct json_object_iterator* iter);
|
||||
|
||||
JSON_EXPORT struct json_object *
|
||||
json_object_iter_peek_value(const struct json_object_iterator *iter);
|
||||
|
||||
/** Tests two iterators for equality. Typically used to test
|
||||
* for end of iteration by comparing an iterator to the
|
||||
@@ -235,14 +225,11 @@ json_object_iter_peek_value(const struct json_object_iterator* iter);
|
||||
* reference the same name/value pair or are both at
|
||||
* "end"); zero if they are not equal.
|
||||
*/
|
||||
JSON_EXPORT json_bool
|
||||
json_object_iter_equal(const struct json_object_iterator* iter1,
|
||||
const struct json_object_iterator* iter2);
|
||||
|
||||
JSON_EXPORT json_bool json_object_iter_equal(const struct json_object_iterator *iter1,
|
||||
const struct json_object_iterator *iter2);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* JSON_OBJECT_ITERATOR_H */
|
||||
|
||||
Reference in New Issue
Block a user