8de2fa9bd4
The AMvalue union, AMlistItem struct, AMmapItem struct, and AMobjItem struct are gone, replaced by the AMitem struct. The AMchangeHashes, AMchanges, AMlistItems, AMmapItems, AMobjItems, AMstrs, and AMsyncHaves iterators are gone, replaced by the AMitems iterator. The AMitem struct is opaque, getting and setting values is now achieved exclusively through function calls. The AMitemsNext(), AMitemsPrev(), and AMresultItem() functions return a pointer to an AMitem struct so you ultimately get the same thing whether you're iterating over a sequence or calling AMmapGet() or AMlistGet(). Calling AMitemResult() on an AMitem struct will produce a new AMresult struct referencing its storage so now the AMresult struct for an iterator can be subsequently freed without affecting the AMitem structs that were filtered out of it. The storage for a set of AMitem structs can be recombined into a single AMresult struct by passing pointers to their corresponding AMresult structs to AMresultCat(). For C/C++ programmers, I've added AMstrCmp(), AMstrdup(), AM{idxType,objType,status,valType}ToString() and AM{idxType,objType,status,valType}FromString(). It's also now possible to pass arbitrary parameters through AMstack{Item,Items,Result}() to a callback function.
48 lines
1 KiB
TOML
48 lines
1 KiB
TOML
after_includes = """\n
|
|
/**
|
|
* \\defgroup enumerations Public Enumerations
|
|
* Symbolic names for integer constants.
|
|
*/
|
|
|
|
/**
|
|
* \\memberof AMdoc
|
|
* \\def AM_ROOT
|
|
* \\brief The root object of a document.
|
|
*/
|
|
#define AM_ROOT NULL
|
|
|
|
/**
|
|
* \\memberof AMdoc
|
|
* \\def AM_CHANGE_HASH_SIZE
|
|
* \\brief The count of bytes in a change hash.
|
|
*/
|
|
#define AM_CHANGE_HASH_SIZE 32
|
|
"""
|
|
autogen_warning = """
|
|
/**
|
|
* \\file
|
|
* \\brief All constants, functions and types in the core Automerge C API.
|
|
*
|
|
* \\warning This file is auto-generated by cbindgen.
|
|
*/
|
|
"""
|
|
documentation = true
|
|
documentation_style = "doxy"
|
|
include_guard = "AUTOMERGE_C_H"
|
|
includes = []
|
|
language = "C"
|
|
line_length = 140
|
|
no_includes = true
|
|
style = "both"
|
|
sys_includes = ["stdbool.h", "stddef.h", "stdint.h", "time.h"]
|
|
usize_is_size_t = true
|
|
|
|
[enum]
|
|
derive_const_casts = true
|
|
enum_class = true
|
|
must_use = "MUST_USE_ENUM"
|
|
prefix_with_name = true
|
|
rename_variants = "ScreamingSnakeCase"
|
|
|
|
[export]
|
|
item_types = ["constants", "enums", "functions", "opaque", "structs", "typedefs"]
|