diff options
-rw-r--r-- | fitz/base_memory.c | 4 | ||||
-rw-r--r-- | fitz/fitz.h | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/fitz/base_memory.c b/fitz/base_memory.c index 3fdaff58..cfab858d 100644 --- a/fitz/base_memory.c +++ b/fitz/base_memory.c @@ -183,7 +183,7 @@ fz_free(fz_context *ctx, void *p) } char * -fz_strdup(fz_context *ctx, char *s) +fz_strdup(fz_context *ctx, const char *s) { int len = strlen(s) + 1; char *ns = fz_malloc(ctx, len); @@ -192,7 +192,7 @@ fz_strdup(fz_context *ctx, char *s) } char * -fz_strdup_no_throw(fz_context *ctx, char *s) +fz_strdup_no_throw(fz_context *ctx, const char *s) { int len = strlen(s) + 1; char *ns = fz_malloc_no_throw(ctx, len); diff --git a/fitz/fitz.h b/fitz/fitz.h index 898d2e01..bb4d3831 100644 --- a/fitz/fitz.h +++ b/fitz/fitz.h @@ -503,7 +503,7 @@ void *fz_resize_array(fz_context *ctx, void *p, unsigned int count, unsigned int Returns a pointer to a duplicated string. Throws exception on failure to allocate. */ -char *fz_strdup(fz_context *ctx, char *s); +char *fz_strdup(fz_context *ctx, const char *s); /* fz_free: Frees an allocation. @@ -571,7 +571,7 @@ void *fz_resize_array_no_throw(fz_context *ctx, void *p, unsigned int count, uns Returns a pointer to a duplicated string. Returns NULL on failure to allocate. */ -char *fz_strdup_no_throw(fz_context *ctx, char *s); +char *fz_strdup_no_throw(fz_context *ctx, const char *s); /* Safe string functions |