/* This file is part of the YAZ toolkit.
- * Copyright (C) 1995-2009 Index Data
+ * Copyright (C) 1995-2010 Index Data
* See the file LICENSE for details.
*/
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;
}