diff options
author | David Robillard <d@drobilla.net> | 2012-08-10 20:23:41 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2012-08-10 20:23:41 +0000 |
commit | 99d273dba0c9d657e0cd174174bba576ff8e5d43 (patch) | |
tree | 73fcad8c4d7ae964f601f6bc5d32340847ff7d87 /lv2/lv2plug.in/ns/ext/atom | |
parent | 3497bbc0f999a7fbba8229cee602dbfac2eef57e (diff) | |
download | lv2-99d273dba0c9d657e0cd174174bba576ff8e5d43.tar.xz |
Add LV2_ATOM_CONTENTS_CONST and LV2_ATOM_BODY_CONST.
Diffstat (limited to 'lv2/lv2plug.in/ns/ext/atom')
-rw-r--r-- | lv2/lv2plug.in/ns/ext/atom/atom.h | 11 | ||||
-rw-r--r-- | lv2/lv2plug.in/ns/ext/atom/lv2-atom.doap.ttl | 2 |
2 files changed, 13 insertions, 0 deletions
diff --git a/lv2/lv2plug.in/ns/ext/atom/atom.h b/lv2/lv2plug.in/ns/ext/atom/atom.h index 37a3e6c..8169167 100644 --- a/lv2/lv2plug.in/ns/ext/atom/atom.h +++ b/lv2/lv2plug.in/ns/ext/atom/atom.h @@ -80,11 +80,22 @@ typedef char lv2_atom_assert_double_fits_in_64_bits[ ((void*)((uint8_t*)(atom) + sizeof(type))) /** + Const version of LV2_ATOM_CONTENTS. +*/ +#define LV2_ATOM_CONTENTS_CONST(type, atom) \ + ((const void*)((const uint8_t*)(atom) + sizeof(type))) + +/** Return a pointer to the body of an Atom. The "body" of an atom is the data just past the LV2_Atom head (i.e. the same offset for all types). */ #define LV2_ATOM_BODY(atom) LV2_ATOM_CONTENTS(LV2_Atom, atom) +/** + Const version of LV2_ATOM_BODY. +*/ +#define LV2_ATOM_BODY_CONST(atom) LV2_ATOM_CONTENTS_CONST(LV2_Atom, atom) + /** The header of an atom:Atom. */ typedef struct { uint32_t size; /**< Size in bytes, not including type and size. */ diff --git a/lv2/lv2plug.in/ns/ext/atom/lv2-atom.doap.ttl b/lv2/lv2plug.in/ns/ext/atom/lv2-atom.doap.ttl index 4823bc5..eec8130 100644 --- a/lv2/lv2plug.in/ns/ext/atom/lv2-atom.doap.ttl +++ b/lv2/lv2plug.in/ns/ext/atom/lv2-atom.doap.ttl @@ -26,6 +26,8 @@ rdfs:label "Fix outdated documentation in forge.h." ] , [ rdfs:label "Use consistent label style." + ] , [ + rdfs:label "Add LV2_ATOM_CONTENTS_CONST and LV2_ATOM_BODY_CONST." ] ] ] , [ |