LMMS
Loading...
Searching...
No Matches
sord_internal.h
Go to the documentation of this file.
1/*
2 Copyright 2011-2015 David Robillard <http://drobilla.net>
3
4 Permission to use, copy, modify, and/or distribute this software for any
5 purpose with or without fee is hereby granted, provided that the above
6 copyright notice and this permission notice appear in all copies.
7
8 THIS SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15*/
16
17#ifndef SORD_SORD_INTERNAL_H
18#define SORD_SORD_INTERNAL_H
19
20#include <stddef.h>
21#include <stdint.h>
22
23#include "sord/sord.h"
24
25#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5)
26# define SORD_UNREACHABLE() __builtin_unreachable()
27#else
28# define SORD_UNREACHABLE() assert(false)
29#endif
30
32typedef struct {
33 size_t refs_as_obj;
35
37typedef struct {
38 SordNode* datatype;
39 char lang[16];
41
43struct SordNodeImpl {
44 SerdNode node;
45 size_t refs;
46 union {
47 SordResourceMetadata res;
48 SordLiteralMetadata lit;
50};
51
52#endif /* SORD_SORD_INTERNAL_H */
struct SordNodeImpl SordNode
Definition sord.h:88
Definition sord_internal.h:38
Definition sord_internal.h:44
SordLiteralMetadata lit
Definition sord_internal.h:49
SerdNode node
Serd node.
Definition sord_internal.h:45
union SordNodeImpl::@052037171224207370217055327131317155265237247334 meta
size_t refs
Reference count (# of containing quads).
Definition sord_internal.h:46
SordResourceMetadata res
Definition sord_internal.h:48
Definition sord_internal.h:33