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
Fixed check for Git submodules.
[yaz-moved-to-github.git]
/
src
/
odr_mem.c
diff --git
a/src/odr_mem.c
b/src/odr_mem.c
index
efbda89
..
314361e
100644
(file)
--- a/
src/odr_mem.c
+++ b/
src/odr_mem.c
@@
-2,7
+2,7
@@
* Copyright (C) 1995-2007, Index Data ApS
* See the file LICENSE for details.
*
* Copyright (C) 1995-2007, Index Data ApS
* See the file LICENSE for details.
*
- * $Id: odr_mem.c,v 1.10 2007-04-12 13:52:57 adam Exp $
+ * $Id: odr_mem.c,v 1.12 2007-09-11 08:35:42 adam Exp $
*/
/**
* \file odr_mem.c
*/
/**
* \file odr_mem.c
@@
-39,6
+39,11
@@
char *odr_strdup(ODR o, const char *str)
return nmem_strdup(o->mem, str);
}
return nmem_strdup(o->mem, str);
}
+char *odr_strdup_null(ODR o, const char *str)
+{
+ return nmem_strdup_null(o->mem, str);
+}
+
char *odr_strdupn(ODR o, const char *str, size_t n)
{
return nmem_strdupn(o->mem, str, n);
char *odr_strdupn(ODR o, const char *str, size_t n)
{
return nmem_strdupn(o->mem, str, n);
@@
-57,7
+62,7
@@
int odr_total(ODR o)
Odr_oct *odr_create_Odr_oct(ODR o, const unsigned char *buf, int sz)
{
Odr_oct *p = (Odr_oct *) odr_malloc(o, sizeof(Odr_oct));
Odr_oct *odr_create_Odr_oct(ODR o, const unsigned char *buf, int sz)
{
Odr_oct *p = (Odr_oct *) odr_malloc(o, sizeof(Odr_oct));
- p->buf = odr_malloc(o, sz);
+ p->buf = (unsigned char *) odr_malloc(o, sz);
memcpy(p->buf, buf, sz);
p->size = sz;
p->len = sz;
memcpy(p->buf, buf, sz);
p->size = sz;
p->len = sz;