summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--third_party/linenoise/linenoise.cpp6
-rw-r--r--third_party/linenoise/linenoise.h6
2 files changed, 6 insertions, 6 deletions
diff --git a/third_party/linenoise/linenoise.cpp b/third_party/linenoise/linenoise.cpp
index fd7413d9648..b752ab95caf 100644
--- a/third_party/linenoise/linenoise.cpp
+++ b/third_party/linenoise/linenoise.cpp
@@ -522,7 +522,7 @@ void linenoiseSetCompletionCallback(linenoiseCompletionCallback *fn) {
completionCallback = fn;
}
-void linenoiseAddCompletion(linenoiseCompletions *lc, char *str) {
+void linenoiseAddCompletion(linenoiseCompletions *lc, const char *str) {
size_t len = strlen(str);
char *copy = (char*)malloc(len+1);
memcpy(copy,str,len+1);
@@ -574,7 +574,7 @@ int linenoiseHistorySetMaxLen(int len) {
/* Save the history in the specified file. On success 0 is returned
* otherwise -1 is returned. */
-int linenoiseHistorySave(char *filename) {
+int linenoiseHistorySave(const char *filename) {
FILE *fp = fopen(filename,"w");
int j;
@@ -590,7 +590,7 @@ int linenoiseHistorySave(char *filename) {
*
* If the file exists and the operation succeeded 0 is returned, otherwise
* on error -1 is returned. */
-int linenoiseHistoryLoad(char *filename) {
+int linenoiseHistoryLoad(const char *filename) {
FILE *fp = fopen(filename,"r");
char buf[LINENOISE_MAX_LINE];
diff --git a/third_party/linenoise/linenoise.h b/third_party/linenoise/linenoise.h
index 76a703c2848..72916e59ba4 100644
--- a/third_party/linenoise/linenoise.h
+++ b/third_party/linenoise/linenoise.h
@@ -43,13 +43,13 @@ typedef struct linenoiseCompletions {
typedef void(linenoiseCompletionCallback)(const char *, linenoiseCompletions *);
void linenoiseSetCompletionCallback(linenoiseCompletionCallback *);
-void linenoiseAddCompletion(linenoiseCompletions *, char *);
+void linenoiseAddCompletion(linenoiseCompletions *, const char *);
char *linenoise(const char *prompt);
int linenoiseHistoryAdd(const char *line);
int linenoiseHistorySetMaxLen(int len);
-int linenoiseHistorySave(char *filename);
-int linenoiseHistoryLoad(char *filename);
+int linenoiseHistorySave(const char *filename);
+int linenoiseHistoryLoad(const char *filename);
void linenoiseClearScreen(void);
#endif /* __LINENOISE_H */