/* This file is part of the yazpp toolkit.
- * Copyright (C) 1998-2010 Index Data and Mike Taylor
+ * Copyright (C) 1998-2012 Index Data and Mike Taylor
* See the file LICENSE for details.
*/
+#if HAVE_CONFIG_H
+#include <config.h>
+#endif
#include <yaz/log.h>
#include <yaz/proto.h>
#include <yaz/copy_types.h>
nmem_destroy(m_mem);
}
-void RecordCache::set_max_size(int sz)
+void RecordCache::set_max_size(size_t sz)
{
m_max_size = sz;
}
{
ODR encode = odr_createmem(ODR_ENCODE);
ODR decode = odr_createmem(ODR_DECODE);
-
+
m_searchRequest = 0;
m_presentRequest = 0;
int v = z_PresentRequest (encode, &pr, 1, 0);
int match = 0;
ODR o1 = odr_createmem(ODR_ENCODE);
ODR o2 = odr_createmem(ODR_ENCODE);
-
+
z_RecordComposition(o1, &comp, 1, 0);
z_RecordComposition(o2, &entry->m_comp, 1, 0);
char *buf1 = odr_getbuf(o1, &len1, 0);
int len2 = -1;
char *buf2 = odr_getbuf(o2, &len2, 0);
-
+
if (buf1 && buf2 && len1 && len1 == len2 && !memcmp(buf1, buf2, len1))
match = 1;
else if (!buf1 && !buf2 && !len1 && !len2)
match = 1;
-
+
odr_destroy(o1);
odr_destroy(o2);
if (!match)