From 9f8176447befa4f10847f38c3d8e6bd112d8b8b0 Mon Sep 17 00:00:00 2001 From: c9s Date: Tue, 27 May 2014 01:08:01 +0800 Subject: [PATCH] const char * --- include/r3_str.h | 2 +- src/str.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/r3_str.h b/include/r3_str.h index f83bfcf..2a4d5a5 100644 --- a/include/r3_str.h +++ b/include/r3_str.h @@ -10,7 +10,7 @@ #include "r3.h" #include "config.h" -int slug_count(char * p, int len); +int slug_count(const char * p, int len); char * slug_compile(char * str, int len); diff --git a/src/str.c b/src/str.c index 9c5e1e8..84879ee 100644 --- a/src/str.c +++ b/src/str.c @@ -42,7 +42,7 @@ int r3_pattern_to_opcode(char * pattern, int len) { /** * provide a quick way to count slugs, simply search for '{' */ -int slug_count(char * p, int len) { +int slug_count(const char * p, int len) { int s = 0; int lev = 0; while( len-- ) {