diff options
author | David Robillard <d@drobilla.net> | 2018-05-10 19:49:05 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2018-06-15 10:06:55 -0400 |
commit | 275581c775bce4d3fa5f687d9ad6fcec72ce11d1 (patch) | |
tree | 1d9c1bb81ab854814c394dd617d85dcff8d44c09 /src | |
parent | cd8f0efd81c9a74fe2c1ca5b0230235ad29d1e44 (diff) | |
download | serd-275581c775bce4d3fa5f687d9ad6fcec72ce11d1.tar.gz serd-275581c775bce4d3fa5f687d9ad6fcec72ce11d1.tar.bz2 serd-275581c775bce4d3fa5f687d9ad6fcec72ce11d1.zip |
Remove redundant SERD_API declarations
Diffstat (limited to 'src')
-rw-r--r-- | src/env.c | 10 | ||||
-rw-r--r-- | src/node.c | 13 | ||||
-rw-r--r-- | src/reader.c | 15 | ||||
-rw-r--r-- | src/string.c | 4 | ||||
-rw-r--r-- | src/uri.c | 7 | ||||
-rw-r--r-- | src/writer.c | 14 |
6 files changed, 0 insertions, 63 deletions
@@ -31,7 +31,6 @@ struct SerdEnvImpl { SerdURI base_uri; }; -SERD_API SerdEnv* serd_env_new(const SerdNode* base_uri) { @@ -42,7 +41,6 @@ serd_env_new(const SerdNode* base_uri) return env; } -SERD_API void serd_env_free(SerdEnv* env) { @@ -55,7 +53,6 @@ serd_env_free(SerdEnv* env) free(env); } -SERD_API const SerdNode* serd_env_get_base_uri(const SerdEnv* env, SerdURI* out) @@ -66,7 +63,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) @@ -124,7 +120,6 @@ serd_env_add(SerdEnv* env, } } -SERD_API SerdStatus serd_env_set_prefix(SerdEnv* env, const SerdNode* name, @@ -148,7 +143,6 @@ serd_env_set_prefix(SerdEnv* env, return SERD_SUCCESS; } -SERD_API SerdStatus serd_env_set_prefix_from_strings(SerdEnv* env, const uint8_t* name, @@ -160,7 +154,6 @@ serd_env_set_prefix_from_strings(SerdEnv* env, return serd_env_set_prefix(env, &name_node, &uri_node); } -SERD_API bool serd_env_qualify(const SerdEnv* env, const SerdNode* uri, @@ -183,7 +176,6 @@ serd_env_qualify(const SerdEnv* env, return false; } -SERD_API SerdStatus serd_env_expand(const SerdEnv* env, const SerdNode* curie, @@ -208,7 +200,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) @@ -236,7 +227,6 @@ serd_env_expand_node(const SerdEnv* env, } } -SERD_API void serd_env_foreach(const SerdEnv* env, SerdPrefixSink func, @@ -31,7 +31,6 @@ # endif #endif -SERD_API SerdNode serd_node_from_string(SerdType type, const uint8_t* str) { @@ -46,7 +45,6 @@ serd_node_from_string(SerdType type, const uint8_t* str) return ret; } -SERD_API SerdNode serd_node_from_substring(SerdType type, const uint8_t* str, const size_t len) { @@ -62,7 +60,6 @@ serd_node_from_substring(SerdType type, const uint8_t* str, const size_t len) return ret; } -SERD_API SerdNode serd_node_copy(const SerdNode* node) { @@ -77,7 +74,6 @@ serd_node_copy(const SerdNode* node) return copy; } -SERD_API bool serd_node_equals(const SerdNode* a, const SerdNode* b) { @@ -116,7 +112,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, @@ -127,7 +122,6 @@ serd_node_new_uri_from_node(const SerdNode* uri_node, : SERD_NODE_NULL; } -SERD_API SerdNode serd_node_new_uri_from_string(const uint8_t* str, const SerdURI* base, @@ -162,7 +156,6 @@ is_uri_path_char(const uint8_t c) } } -SERD_API SerdNode serd_node_new_file_uri(const uint8_t* path, const uint8_t* hostname, @@ -206,7 +199,6 @@ serd_node_new_file_uri(const uint8_t* path, return serd_node_from_substring(SERD_URI, chunk.buf, chunk.len); } -SERD_API SerdNode serd_node_new_uri(const SerdURI* uri, const SerdURI* base, SerdURI* out) { @@ -232,7 +224,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, @@ -265,7 +256,6 @@ serd_digits(double abs) return lg < 1.0 ? 1U : (unsigned)lg; } -SERD_API SerdNode serd_node_new_decimal(double d, unsigned frac_digits) { @@ -320,7 +310,6 @@ serd_node_new_decimal(double d, unsigned frac_digits) return node; } -SERD_API SerdNode serd_node_new_integer(int64_t i) { @@ -367,7 +356,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) { @@ -389,7 +377,6 @@ serd_node_new_blob(const void* buf, size_t size, bool wrap_lines) return node; } -SERD_API void serd_node_free(SerdNode* node) { diff --git a/src/reader.c b/src/reader.c index e9210927..c9b00f66 100644 --- a/src/reader.c +++ b/src/reader.c @@ -162,7 +162,6 @@ read_doc(SerdReader* reader) } } -SERD_API SerdReader* serd_reader_new(SerdSyntax syntax, void* handle, @@ -192,14 +191,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, @@ -209,7 +206,6 @@ serd_reader_set_error_sink(SerdReader* reader, reader->error_handle = error_handle; } -SERD_API void serd_reader_free(SerdReader* reader) { @@ -229,14 +225,12 @@ serd_reader_free(SerdReader* reader) free(reader); } -SERD_API void* serd_reader_get_handle(const SerdReader* reader) { return reader->handle; } -SERD_API void serd_reader_add_blank_prefix(SerdReader* reader, const uint8_t* prefix) @@ -251,7 +245,6 @@ serd_reader_add_blank_prefix(SerdReader* reader, } } -SERD_API void serd_reader_set_default_graph(SerdReader* reader, const SerdNode* graph) @@ -260,7 +253,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 uint8_t* uri) @@ -299,7 +291,6 @@ skip_bom(SerdReader* me) return SERD_SUCCESS; } -SERD_API SerdStatus serd_reader_start_stream(SerdReader* reader, FILE* file, @@ -315,7 +306,6 @@ serd_reader_start_stream(SerdReader* reader, bulk ? SERD_PAGE_SIZE : 1); } -SERD_API SerdStatus serd_reader_start_source_stream(SerdReader* reader, SerdSource read_func, @@ -342,7 +332,6 @@ serd_reader_prepare(SerdReader* reader) return reader->status; } -SERD_API SerdStatus serd_reader_read_chunk(SerdReader* reader) { @@ -356,14 +345,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_file_handle(SerdReader* reader, FILE* file, @@ -374,7 +361,6 @@ serd_reader_read_file_handle(SerdReader* reader, file, name, SERD_PAGE_SIZE); } -SERD_API SerdStatus serd_reader_read_source(SerdReader* reader, SerdSource source, @@ -397,7 +383,6 @@ serd_reader_read_source(SerdReader* reader, return serd_reader_end_stream(reader); } -SERD_API SerdStatus serd_reader_read_string(SerdReader* reader, const uint8_t* utf8) { diff --git a/src/string.c b/src/string.c index dedd0713..d49e1e68 100644 --- a/src/string.c +++ b/src/string.c @@ -18,7 +18,6 @@ #include <math.h> -SERD_API const uint8_t* serd_strerror(SerdStatus status) { @@ -72,7 +71,6 @@ serd_substrlen(const uint8_t* const str, return n_chars; } -SERD_API size_t serd_strlen(const uint8_t* str, size_t* n_bytes, SerdNodeFlags* flags) { @@ -105,7 +103,6 @@ read_sign(const char** sptr) } } -SERD_API double serd_strtod(const char* str, char** endptr) { @@ -176,7 +173,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 uint8_t* str, size_t len, size_t* size) { @@ -21,7 +21,6 @@ // #define URI_DEBUG 1 -SERD_API const uint8_t* serd_uri_to_path(const uint8_t* uri) { @@ -45,7 +44,6 @@ serd_uri_to_path(const uint8_t* uri) return path; } -SERD_API uint8_t* serd_file_uri_parse(const uint8_t* uri, uint8_t** hostname) { @@ -95,7 +93,6 @@ serd_file_uri_parse(const uint8_t* uri, uint8_t** hostname) return serd_chunk_sink_finish(&chunk); } -SERD_API bool serd_uri_string_has_scheme(const uint8_t* utf8) { @@ -135,7 +132,6 @@ serd_uri_dump(const SerdURI* uri, FILE* file) } #endif -SERD_API SerdStatus serd_uri_parse(const uint8_t* utf8, SerdURI* out) { @@ -341,7 +337,6 @@ merge(SerdChunk* base, SerdChunk* 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) { @@ -458,7 +453,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, @@ -496,7 +490,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 5d63b581..69a00d82 100644 --- a/src/writer.c +++ b/src/writer.c @@ -670,7 +670,6 @@ write_list_obj(SerdWriter* writer, return false; } -SERD_API SerdStatus serd_writer_write_statement(SerdWriter* writer, SerdStatementFlags flags, @@ -807,7 +806,6 @@ serd_writer_write_statement(SerdWriter* writer, return SERD_SUCCESS; } -SERD_API SerdStatus serd_writer_end_anon(SerdWriter* writer, const SerdNode* node) @@ -833,7 +831,6 @@ serd_writer_end_anon(SerdWriter* writer, return SERD_SUCCESS; } -SERD_API SerdStatus serd_writer_finish(SerdWriter* writer) { @@ -848,7 +845,6 @@ serd_writer_finish(SerdWriter* writer) return free_context(writer); } -SERD_API SerdWriter* serd_writer_new(SerdSyntax syntax, SerdStyle style, @@ -874,7 +870,6 @@ serd_writer_new(SerdSyntax syntax, return writer; } -SERD_API void serd_writer_set_error_sink(SerdWriter* writer, SerdErrorSink error_sink, @@ -884,7 +879,6 @@ serd_writer_set_error_sink(SerdWriter* writer, writer->error_handle = error_handle; } -SERD_API void serd_writer_chop_blank_prefix(SerdWriter* writer, const uint8_t* prefix) @@ -899,7 +893,6 @@ serd_writer_chop_blank_prefix(SerdWriter* writer, } } -SERD_API SerdStatus serd_writer_set_base_uri(SerdWriter* writer, const SerdNode* uri) @@ -922,7 +915,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) @@ -938,7 +930,6 @@ serd_writer_set_root_uri(SerdWriter* writer, return SERD_SUCCESS; } -SERD_API SerdStatus serd_writer_set_prefix(SerdWriter* writer, const SerdNode* name, @@ -962,7 +953,6 @@ serd_writer_set_prefix(SerdWriter* writer, return SERD_ERR_UNKNOWN; } -SERD_API void serd_writer_free(SerdWriter* writer) { @@ -974,21 +964,18 @@ serd_writer_free(SerdWriter* writer) free(writer); } -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_chunk_sink(const void* buf, size_t len, void* stream) { @@ -999,7 +986,6 @@ serd_chunk_sink(const void* buf, size_t len, void* stream) return len; } -SERD_API uint8_t* serd_chunk_sink_finish(SerdChunk* stream) { |