aboutsummaryrefslogtreecommitdiff
path: root/src/helper
diff options
context:
space:
mode:
Diffstat (limited to 'src/helper')
-rw-r--r--src/helper/jim-nvp.c5
-rw-r--r--src/helper/jim-nvp.h2
2 files changed, 3 insertions, 4 deletions
diff --git a/src/helper/jim-nvp.c b/src/helper/jim-nvp.c
index 4602a8d..d13bdfb 100644
--- a/src/helper/jim-nvp.c
+++ b/src/helper/jim-nvp.c
@@ -205,7 +205,7 @@ int Jim_GetOpt_Obj(Jim_GetOptInfo *goi, Jim_Obj **puthere)
return JIM_ERR;
}
-int Jim_GetOpt_String(Jim_GetOptInfo *goi, char **puthere, int *len)
+int Jim_GetOpt_String(Jim_GetOptInfo *goi, const char **puthere, int *len)
{
int r;
Jim_Obj *o;
@@ -215,8 +215,7 @@ int Jim_GetOpt_String(Jim_GetOptInfo *goi, char **puthere, int *len)
if (r == JIM_OK) {
cp = Jim_GetString(o, len);
if (puthere) {
- /* remove const */
- *puthere = (char *)(cp);
+ *puthere = cp;
}
}
return r;
diff --git a/src/helper/jim-nvp.h b/src/helper/jim-nvp.h
index 05d79c4..ca382dd 100644
--- a/src/helper/jim-nvp.h
+++ b/src/helper/jim-nvp.h
@@ -245,7 +245,7 @@ int Jim_GetOpt_Obj(Jim_GetOptInfo *goi, Jim_Obj **puthere);
* \param puthere - where param is put
* \param len - return its length
*/
-int Jim_GetOpt_String(Jim_GetOptInfo *goi, char **puthere, int *len);
+int Jim_GetOpt_String(Jim_GetOptInfo *goi, const char **puthere, int *len);
/** Remove argv[0] as double.
*