From 00c364dacbb7b2ec8c1c497fffe300d1d3a0a4b5 Mon Sep 17 00:00:00 2001 From: c9s Date: Mon, 2 Jun 2014 05:55:45 +0800 Subject: [PATCH] const --- src/slug.c | 2 +- src/slug.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/slug.c b/src/slug.c index 4714313..55a95be 100644 --- a/src/slug.c +++ b/src/slug.c @@ -63,7 +63,7 @@ int r3_slug_check(r3_slug_t *s, char **errstr) { } -char * r3_slug_to_str(r3_slug_t *s) { +char * r3_slug_to_str(const r3_slug_t *s) { char *str = NULL; asprintf(&str, "slug: '%.*s', pattern: '%.*s', path: '%.*s'", s->len, s->begin, s->pattern_len, s->pattern, s->path_len, s->path); return str; diff --git a/src/slug.h b/src/slug.h index afde660..bf4763f 100644 --- a/src/slug.h +++ b/src/slug.h @@ -45,7 +45,7 @@ int r3_slug_check(r3_slug_t *s, char **errstr); r3_slug_t * r3_slug_parse(const char *needle, int needle_len, char *offset, char **errstr); -char * r3_slug_to_str(r3_slug_t *s); +char * r3_slug_to_str(const r3_slug_t *s); void r3_slug_free(r3_slug_t * s);