diff options
author | David Robillard <d@drobilla.net> | 2018-05-10 19:49:05 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2018-05-27 18:21:57 +0200 |
commit | 129bc1d39254ff4c56e9cffab6d064bc5863ea2f (patch) | |
tree | 3a39bfadfbd68657497630b9f9a4f0069c96bb84 /src | |
parent | 9bc71471086b9f5d5789d76fb28a45c47a058cf8 (diff) | |
download | serd-129bc1d39254ff4c56e9cffab6d064bc5863ea2f.tar.gz serd-129bc1d39254ff4c56e9cffab6d064bc5863ea2f.tar.bz2 serd-129bc1d39254ff4c56e9cffab6d064bc5863ea2f.zip |
Remove redundant SERD_API declarations
Diffstat (limited to 'src')
-rw-r--r-- | src/env.c | 10 | ||||
-rw-r--r-- | src/node.c | 20 | ||||
-rw-r--r-- | src/reader.c | 13 | ||||
-rw-r--r-- | src/string.c | 4 | ||||
-rw-r--r-- | src/uri.c | 6 | ||||
-rw-r--r-- | src/writer.c | 11 |
6 files changed, 0 insertions, 64 deletions
@@ -33,7 +33,6 @@ struct SerdEnvImpl { SerdURI base_uri; }; -SERD_API SerdEnv* serd_env_new(const SerdNode* base_uri) { @@ -44,7 +43,6 @@ serd_env_new(const SerdNode* base_uri) return env; } -SERD_API void serd_env_free(SerdEnv* env) { @@ -57,7 +55,6 @@ serd_env_free(SerdEnv* env) free(env); } -SERD_API const SerdNode* serd_env_get_base_uri(const SerdEnv* env, SerdURI* out) @@ -68,7 +65,6 @@ serd_env_get_base_uri(const SerdEnv* env, return env->base_uri_node; } -SERD_API SerdStatus serd_env_set_base_uri(SerdEnv* env, const SerdNode* uri) @@ -127,7 +123,6 @@ serd_env_add(SerdEnv* env, } } -SERD_API SerdStatus serd_env_set_prefix(SerdEnv* env, const SerdNode* name, @@ -151,7 +146,6 @@ serd_env_set_prefix(SerdEnv* env, return SERD_SUCCESS; } -SERD_API SerdStatus serd_env_set_prefix_from_strings(SerdEnv* env, const char* name, @@ -167,7 +161,6 @@ serd_env_set_prefix_from_strings(SerdEnv* env, return st; } -SERD_API bool serd_env_qualify(const SerdEnv* env, const SerdNode* uri, @@ -191,7 +184,6 @@ serd_env_qualify(const SerdEnv* env, return false; } -SERD_API SerdStatus serd_env_expand(const SerdEnv* env, const SerdNode* curie, @@ -216,7 +208,6 @@ serd_env_expand(const SerdEnv* env, return SERD_ERR_BAD_CURIE; } -SERD_API SerdNode* serd_env_expand_node(const SerdEnv* env, const SerdNode* node) @@ -244,7 +235,6 @@ serd_env_expand_node(const SerdEnv* env, } } -SERD_API void serd_env_foreach(const SerdEnv* env, SerdPrefixSink func, @@ -82,7 +82,6 @@ serd_node_set(SerdNode** dst, const SerdNode* src) } } -SERD_API SerdNode* serd_node_new_string(SerdType type, const char* str) { @@ -98,7 +97,6 @@ serd_node_new_string(SerdType type, const char* str) return node; } -SERD_API SerdNode* serd_node_new_substring(SerdType type, const char* str, const size_t len) { @@ -114,7 +112,6 @@ serd_node_new_substring(SerdType type, const char* str, const size_t len) return node; } -SERD_API SerdNode* serd_node_new_literal(const char* str, const char* datatype, const char* lang) { @@ -160,7 +157,6 @@ serd_node_new_literal(const char* str, const char* datatype, const char* lang) return node; } -SERD_API SerdNode* serd_node_copy(const SerdNode* node) { @@ -174,7 +170,6 @@ serd_node_copy(const SerdNode* node) return copy; } -SERD_API bool serd_node_equals(const SerdNode* a, const SerdNode* b) { @@ -217,7 +212,6 @@ string_sink(const void* buf, size_t len, void* stream) return len; } -SERD_API SerdNode* serd_node_new_uri_from_node(const SerdNode* uri_node, const SerdURI* base, @@ -229,7 +223,6 @@ serd_node_new_uri_from_node(const SerdNode* uri_node, : NULL; } -SERD_API SerdNode* serd_node_new_uri_from_string(const char* str, const SerdURI* base, @@ -264,7 +257,6 @@ is_uri_path_char(const char c) } } -SERD_API SerdNode* serd_node_new_file_uri(const char* path, const char* hostname, @@ -310,7 +302,6 @@ serd_node_new_file_uri(const char* path, return node; } -SERD_API SerdNode* serd_node_new_uri(const SerdURI* uri, const SerdURI* base, SerdURI* out) { @@ -334,7 +325,6 @@ serd_node_new_uri(const SerdURI* uri, const SerdURI* base, SerdURI* out) return node; } -SERD_API SerdNode* serd_node_new_relative_uri(const SerdURI* uri, const SerdURI* base, @@ -365,7 +355,6 @@ serd_digits(double abs) return lg < 1.0 ? 1U : (unsigned)lg; } -SERD_API SerdNode* serd_node_new_decimal(double d, unsigned frac_digits) { @@ -422,7 +411,6 @@ serd_node_new_decimal(double d, unsigned frac_digits) return node; } -SERD_API SerdNode* serd_node_new_integer(int64_t i) { @@ -469,7 +457,6 @@ encode_chunk(uint8_t out[4], const uint8_t in[3], size_t n_in) out[3] = ((n_in > 2) ? b64_map[in[2] & 0x3F] : (uint8_t)'='); } -SERD_API SerdNode* serd_node_new_blob(const void* buf, size_t size, bool wrap_lines) { @@ -492,28 +479,24 @@ serd_node_new_blob(const void* buf, size_t size, bool wrap_lines) return node; } -SERD_API SerdType serd_node_get_type(const SerdNode* node) { return node ? node->type : SERD_NOTHING; } -SERD_API const char* serd_node_get_string(const SerdNode* node) { return node ? (const char*)(node + 1) : NULL; } -SERD_API size_t serd_node_get_length(const SerdNode* node) { return node ? node->n_bytes : 0; } -SERD_API const SerdNode* serd_node_get_datatype(const SerdNode* node) { @@ -530,7 +513,6 @@ serd_node_get_datatype(const SerdNode* node) return datatype; } -SERD_API const SerdNode* serd_node_get_language(const SerdNode* node) { @@ -547,14 +529,12 @@ serd_node_get_language(const SerdNode* node) return lang; } -SERD_API SerdNodeFlags serd_node_get_flags(const SerdNode* node) { return node->flags; } -SERD_API void serd_node_free(SerdNode* node) { diff --git a/src/reader.c b/src/reader.c index 7e05d25c..8c3988d0 100644 --- a/src/reader.c +++ b/src/reader.c @@ -138,7 +138,6 @@ read_statement(SerdReader* reader) } } -SERD_API SerdStatus serd_reader_read_document(SerdReader* reader) { @@ -155,7 +154,6 @@ serd_reader_read_document(SerdReader* reader) } } -SERD_API SerdReader* serd_reader_new(SerdSyntax syntax, const SerdSinkInterface* sink) @@ -175,14 +173,12 @@ serd_reader_new(SerdSyntax syntax, return me; } -SERD_API void serd_reader_set_strict(SerdReader* reader, bool strict) { reader->strict = strict; } -SERD_API void serd_reader_set_error_sink(SerdReader* reader, SerdErrorSink error_sink, @@ -192,7 +188,6 @@ serd_reader_set_error_sink(SerdReader* reader, reader->error_handle = error_handle; } -SERD_API void serd_reader_free(SerdReader* reader) { @@ -209,7 +204,6 @@ serd_reader_free(SerdReader* reader) free(reader); } -SERD_API void serd_reader_add_blank_prefix(SerdReader* reader, const char* prefix) @@ -224,7 +218,6 @@ serd_reader_add_blank_prefix(SerdReader* reader, } } -SERD_API void serd_reader_set_default_graph(SerdReader* reader, const SerdNode* graph) @@ -233,7 +226,6 @@ serd_reader_set_default_graph(SerdReader* reader, reader->default_graph = serd_node_copy(graph); } -SERD_API SerdStatus serd_reader_read_file(SerdReader* reader, const char* uri) @@ -282,7 +274,6 @@ skip_bom(SerdReader* me) return SERD_SUCCESS; } -SERD_API SerdStatus serd_reader_start_stream(SerdReader* reader, SerdSource read_func, @@ -295,7 +286,6 @@ serd_reader_start_stream(SerdReader* reader, &reader->source, read_func, error_func, stream, name, page_size); } -SERD_API SerdStatus serd_reader_start_string(SerdReader* reader, const char* utf8) { @@ -316,7 +306,6 @@ serd_reader_prepare(SerdReader* reader) return reader->status; } -SERD_API SerdStatus serd_reader_read_chunk(SerdReader* reader) { @@ -330,14 +319,12 @@ serd_reader_read_chunk(SerdReader* reader) return st ? st : read_statement(reader) ? SERD_SUCCESS : SERD_FAILURE; } -SERD_API SerdStatus serd_reader_end_stream(SerdReader* reader) { return serd_byte_source_close(&reader->source); } -SERD_API SerdStatus serd_reader_read_string(SerdReader* reader, const char* utf8) { diff --git a/src/string.c b/src/string.c index 7b8fc662..783d2b3f 100644 --- a/src/string.c +++ b/src/string.c @@ -20,7 +20,6 @@ #include "string_utils.h" -SERD_API const char* serd_strerror(SerdStatus status) { @@ -38,7 +37,6 @@ serd_strerror(SerdStatus status) return "Unknown error"; // never reached } -SERD_API size_t serd_strlen(const char* str, SerdNodeFlags* flags) { @@ -64,7 +62,6 @@ read_sign(const char** sptr) } } -SERD_API double serd_strtod(const char* str, size_t* end) { @@ -135,7 +132,6 @@ decode_chunk(const uint8_t in[4], uint8_t out[3]) return 1 + (in[2] != '=') + ((in[2] != '=') && (in[3] != '=')); } -SERD_API void* serd_base64_decode(const char* str, size_t len, size_t* size) { @@ -23,7 +23,6 @@ // #define URI_DEBUG 1 -SERD_API char* serd_file_uri_parse(const char* uri, char** hostname) { @@ -73,7 +72,6 @@ serd_file_uri_parse(const char* uri, char** hostname) return serd_buffer_sink_finish(&buffer); } -SERD_API bool serd_uri_string_has_scheme(const char* utf8) { @@ -113,7 +111,6 @@ serd_uri_dump(const SerdURI* uri, FILE* file) } #endif -SERD_API SerdStatus serd_uri_parse(const char* utf8, SerdURI* out) { @@ -319,7 +316,6 @@ merge(SerdSlice* base, SerdSlice* path) } /// See http://tools.ietf.org/html/rfc3986#section-5.2.2 -SERD_API void serd_uri_resolve(const SerdURI* r, const SerdURI* base, SerdURI* t) { @@ -434,7 +430,6 @@ write_rel_path(SerdSink sink, } /// See http://tools.ietf.org/html/rfc3986#section-5.3 -SERD_API size_t serd_uri_serialise_relative(const SerdURI* uri, const SerdURI* base, @@ -470,7 +465,6 @@ serd_uri_serialise_relative(const SerdURI* uri, } /// See http://tools.ietf.org/html/rfc3986#section-5.3 -SERD_API size_t serd_uri_serialise(const SerdURI* uri, SerdSink sink, void* stream) { diff --git a/src/writer.c b/src/writer.c index 2671ba7d..c57323b0 100644 --- a/src/writer.c +++ b/src/writer.c @@ -857,7 +857,6 @@ serd_writer_end_anon(SerdWriter* writer, return SERD_SUCCESS; } -SERD_API SerdStatus serd_writer_finish(SerdWriter* writer) { @@ -874,7 +873,6 @@ serd_writer_finish(SerdWriter* writer) return SERD_SUCCESS; } -SERD_API SerdWriter* serd_writer_new(SerdSyntax syntax, SerdStyle style, @@ -907,7 +905,6 @@ serd_writer_new(SerdSyntax syntax, return writer; } -SERD_API void serd_writer_set_error_sink(SerdWriter* writer, SerdErrorSink error_sink, @@ -917,7 +914,6 @@ serd_writer_set_error_sink(SerdWriter* writer, writer->error_handle = error_handle; } -SERD_API void serd_writer_chop_blank_prefix(SerdWriter* writer, const char* prefix) @@ -954,7 +950,6 @@ serd_writer_set_base_uri(SerdWriter* writer, return SERD_ERR_UNKNOWN; } -SERD_API SerdStatus serd_writer_set_root_uri(SerdWriter* writer, const SerdNode* uri) @@ -994,7 +989,6 @@ serd_writer_set_prefix(SerdWriter* writer, return SERD_ERR_UNKNOWN; } -SERD_API void serd_writer_free(SerdWriter* writer) { @@ -1006,28 +1000,24 @@ serd_writer_free(SerdWriter* writer) free(writer); } -SERD_API const SerdSinkInterface* serd_writer_get_sink_interface(SerdWriter* writer) { return &writer->iface; } -SERD_API SerdEnv* serd_writer_get_env(SerdWriter* writer) { return writer->env; } -SERD_API size_t serd_file_sink(const void* buf, size_t len, void* stream) { return fwrite(buf, 1, len, (FILE*)stream); } -SERD_API size_t serd_buffer_sink(const void* buf, size_t len, void* stream) { @@ -1038,7 +1028,6 @@ serd_buffer_sink(const void* buf, size_t len, void* stream) return len; } -SERD_API char* serd_buffer_sink_finish(SerdBuffer* stream) { |