Version 3.0.49. Update news.
[yaz-moved-to-github.git] / src / nmemsdup.c
index 3581d77..1f9d415 100644 (file)
@@ -38,9 +38,16 @@ char *nmem_strdupn (NMEM mem, const char *src, size_t n)
     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;
 }
@@ -106,6 +113,7 @@ char *nmem_text_node_cdata(const xmlNode *ptr_cdata, NMEM nmem)
 /*
  * Local variables:
  * c-basic-offset: 4
+ * c-file-style: "Stroustrup"
  * indent-tabs-mode: nil
  * End:
  * vim: shiftwidth=4 tabstop=8 expandtab