projects
/
pazpar2-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Allow merge on merged content
[pazpar2-moved-to-github.git]
/
src
/
record.c
diff --git
a/src/record.c
b/src/record.c
index
7db84e3
..
53cb34e
100644
(file)
--- a/
src/record.c
+++ b/
src/record.c
@@
-30,8
+30,8
@@
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#include "client.h"
#include "record.h"
#include "client.h"
#include "record.h"
-union data_types * data_types_assign(NMEM nmem,
- union data_types ** data1,
+union data_types * data_types_assign(NMEM nmem,
+ union data_types ** data1,
union data_types data2)
{
// assert(nmem);
union data_types data2)
{
// assert(nmem);
@@
-45,7
+45,7
@@
union data_types * data_types_assign(NMEM nmem,
else
*data1 = nmem_malloc(nmem, sizeof(union data_types));
}
else
*data1 = nmem_malloc(nmem, sizeof(union data_types));
}
-
+
**data1 = data2;
return *data1;
}
**data1 = data2;
return *data1;
}
@@
-58,7
+58,7
@@
struct record * record_create(NMEM nmem, int num_metadata, int num_sortkeys,
int i = 0;
const char *name = client_get_id(client);
unsigned h = position;
int i = 0;
const char *name = client_get_id(client);
unsigned h = position;
-
+
// assert(nmem);
record = nmem_malloc(nmem, sizeof(struct record));
// assert(nmem);
record = nmem_malloc(nmem, sizeof(struct record));
@@
-66,14
+66,14
@@
struct record * record_create(NMEM nmem, int num_metadata, int num_sortkeys,
record->next = 0;
record->client = client;
record->next = 0;
record->client = client;
- record->metadata
- = nmem_malloc(nmem,
+ record->metadata
+ = nmem_malloc(nmem,
sizeof(struct record_metadata*) * num_metadata);
for (i = 0; i < num_metadata; i++)
record->metadata[i] = 0;
sizeof(struct record_metadata*) * num_metadata);
for (i = 0; i < num_metadata; i++)
record->metadata[i] = 0;
-
- record->sortkeys
- = nmem_malloc(nmem,
+
+ record->sortkeys
+ = nmem_malloc(nmem,
sizeof(union data_types*) * num_sortkeys);
for (i = 0; i < num_sortkeys; i++)
record->sortkeys[i] = 0;
sizeof(union data_types*) * num_sortkeys);
for (i = 0; i < num_sortkeys; i++)
record->sortkeys[i] = 0;
@@
-84,13
+84,13
@@
struct record * record_create(NMEM nmem, int num_metadata, int num_sortkeys,
h = h * 65509 + ((unsigned char *) name)[i];
record->checksum = h;
h = h * 65509 + ((unsigned char *) name)[i];
record->checksum = h;
-
+
return record;
}
struct record_metadata * record_metadata_create(NMEM nmem)
{
return record;
}
struct record_metadata * record_metadata_create(NMEM nmem)
{
- struct record_metadata * rec_md
+ struct record_metadata * rec_md
= nmem_malloc(nmem, sizeof(struct record_metadata));
rec_md->next = 0;
rec_md->attributes = 0;
= nmem_malloc(nmem, sizeof(struct record_metadata));
rec_md->next = 0;
rec_md->attributes = 0;
@@
-106,7
+106,7
@@
int record_compare(struct record *r1, struct record *r2,
{
struct conf_metadata *ser_md = &service->metadata[i];
enum conf_metadata_type type = ser_md->type;
{
struct conf_metadata *ser_md = &service->metadata[i];
enum conf_metadata_type type = ser_md->type;
-
+
struct record_metadata *m1 = r1->metadata[i];
struct record_metadata *m2 = r2->metadata[i];
while (m1 && m2)
struct record_metadata *m1 = r1->metadata[i];
struct record_metadata *m2 = r2->metadata[i];
while (m1 && m2)