projects
/
yaz-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add const modifier for two ICU utils
[yaz-moved-to-github.git]
/
src
/
nmemsdup.c
diff --git
a/src/nmemsdup.c
b/src/nmemsdup.c
index
d30dbaf
..
1f9d415
100644
(file)
--- a/
src/nmemsdup.c
+++ b/
src/nmemsdup.c
@@
-38,9
+38,16
@@
char *nmem_strdupn (NMEM mem, const char *src, size_t n)
return dst;
}
return dst;
}
-int *nmem_intdup(NMEM mem, int v)
+nmem_int_t *nmem_intdup(NMEM mem, nmem_int_t v)
{
{
- int *dst = (int*) nmem_malloc (mem, sizeof(int));
+ nmem_int_t *dst = (nmem_int_t*) nmem_malloc (mem, sizeof(*dst));
+ *dst = v;
+ return dst;
+}
+
+nmem_bool_t *nmem_booldup(NMEM mem, nmem_bool_t v)
+{
+ nmem_bool_t *dst = (nmem_bool_t*) nmem_malloc (mem, sizeof(*dst));
*dst = v;
return dst;
}
*dst = v;
return dst;
}