diff --git a/v8js_commonjs.cc b/v8js_commonjs.cc index 2d67e3c..80a8a3b 100644 --- a/v8js_commonjs.cc +++ b/v8js_commonjs.cc @@ -22,7 +22,7 @@ extern "C" { #include "php_v8js_macros.h" -static void v8js_commonjs_split_terms(char *identifier, std::vector &terms) +static void v8js_commonjs_split_terms(const char *identifier, std::vector &terms) { char *term = (char *) emalloc(PATH_MAX), *ptr = term; @@ -56,7 +56,7 @@ static void v8js_commonjs_split_terms(char *identifier, std::vector &ter efree(term); } -void v8js_commonjs_normalise_identifier(char *base, char *identifier, char *normalised_path, char *module_name) +void v8js_commonjs_normalise_identifier(const char *base, const char *identifier, char *normalised_path, char *module_name) { std::vector id_terms, terms; v8js_commonjs_split_terms(identifier, id_terms); diff --git a/v8js_commonjs.h b/v8js_commonjs.h index a2537e2..1c05fb6 100644 --- a/v8js_commonjs.h +++ b/v8js_commonjs.h @@ -13,6 +13,6 @@ #ifndef V8JS_COMMONJS_H #define V8JS_COMMONJS_H -void v8js_commonjs_normalise_identifier(char *base, char *identifier, char *normalised_path, char *module_name); +void v8js_commonjs_normalise_identifier(const char *base, const char *identifier, char *normalised_path, char *module_name); #endif /* V8JS_COMMONJS_H */