From 48b9e626ed3ba6dd20c6be1c5c79294ab1133cf5 Mon Sep 17 00:00:00 2001 From: lurchi Date: Mon, 5 Sep 2016 11:33:42 +0200 Subject: [PATCH] forgot for change some static inline functions, see commit 9d7ad2a; tests passing again --- include/psyc/text.h | 2 +- src/parse.c | 10 +++++----- src/render.c | 2 +- src/text.c | 3 +++ 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/include/psyc/text.h b/include/psyc/text.h index fd1d64a..300c2a9 100644 --- a/include/psyc/text.h +++ b/include/psyc/text.h @@ -172,7 +172,7 @@ psyc_text (PsycTextState *state, PsycTextCB get_value, void *get_value_cls); extern const PsycTemplates psyc_templates; -static inline const char * +inline const char * psyc_template (PsycMethod mc, size_t *len) { PsycString t = psyc_templates.a[mc]; if (len) diff --git a/src/parse.c b/src/parse.c index a77a528..83675a3 100644 --- a/src/parse.c +++ b/src/parse.c @@ -119,7 +119,7 @@ psyc_parse_remaining_buffer (PsycParseState *state); * * @return PARSE_ERROR or PARSE_SUCCESS */ -static inline ParseRC +inline ParseRC parse_keyword (ParseState *state, PsycString *name) { name->data = state->buffer.data + state->cursor; @@ -138,7 +138,7 @@ parse_keyword (ParseState *state, PsycString *name) * * @return PARSE_SUCCESS, PARSE_ERROR or PARSE_INSUFFICIENT */ -static inline ParseRC +inline ParseRC parse_length (ParseState *state, size_t *len) { ParseRC ret = PARSE_ERROR; @@ -165,7 +165,7 @@ parse_length (ParseState *state, size_t *len) * * @return PARSE_SUCCESS or PARSE_INCOMPLETE */ -static inline ParseRC +inline ParseRC parse_binary (ParseState *state, size_t length, PsycString *value, size_t *parsed) { size_t remaining = length - *parsed; @@ -197,7 +197,7 @@ parse_binary (ParseState *state, size_t length, PsycString *value, size_t *parse * * @return PARSE_SUCCESS or PARSE_INSUFFICIENT */ -static inline ParseRC +inline ParseRC parse_until (ParseState *state, const char end, PsycString *value) { value->data = state->buffer.data + state->cursor; @@ -282,7 +282,7 @@ psyc_parse_modifier (PsycParseState *state, char *oper, /** Parse PSYC packets. */ #ifdef __INLINE_PSYC_PARSE -static inline +extern inline #endif PsycParseRC psyc_parse (PsycParseState *state, char *oper, diff --git a/src/render.c b/src/render.c index 6edde8b..336a5ac 100644 --- a/src/render.c +++ b/src/render.c @@ -105,7 +105,7 @@ psyc_render_list (PsycList *list, char *buffer, size_t buflen) } #ifdef __INLINE_PSYC_RENDER -static inline +extern inline #endif PsycRenderRC psyc_render_dict (PsycDict *dict, char *buffer, size_t buflen) diff --git a/src/text.c b/src/text.c index 9267253..f651649 100644 --- a/src/text.c +++ b/src/text.c @@ -43,6 +43,9 @@ psyc_text_buffer_set (PsycTextState *state, char *buffer, size_t length); extern inline size_t psyc_text_bytes_written (PsycTextState *state); +extern inline const char * +psyc_template (PsycMethod mc, size_t *len); + PsycTextRC psyc_text (PsycTextState *state, PsycTextCB get_value, void *get_value_cls) {