-/*
- * Copyright (C) 1995-2007, Index Data ApS
+/* This file is part of the YAZ toolkit.
+ * Copyright (C) 1995-2010 Index Data
* See the file LICENSE for details.
- *
- * $Id: nmemsdup.c,v 1.11 2007-05-06 20:12:20 adam Exp $
*/
/**
return dst;
}
-int *nmem_intdup(NMEM mem, int v)
+nmem_int_t *nmem_intdup(NMEM mem, nmem_int_t v)
+{
+ 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)
{
- int *dst = (int*) nmem_malloc (mem, sizeof(int));
+ nmem_bool_t *dst = (nmem_bool_t*) nmem_malloc (mem, sizeof(*dst));
*dst = v;
return dst;
}
/*
* Local variables:
* c-basic-offset: 4
+ * c-file-style: "Stroustrup"
* indent-tabs-mode: nil
* End:
* vim: shiftwidth=4 tabstop=8 expandtab