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) {