Lines Matching refs:encoder
68 struct dsync_serializer_encoder *encoder;
71 encoder = p_new(pool, struct dsync_serializer_encoder, 1);
72 encoder->pool = pool;
73 encoder->serializer = serializer;
74 p_array_init(&encoder->values, pool, serializer->keys_count);
75 return encoder;
78 void dsync_serializer_encode_add(struct dsync_serializer_encoder *encoder,
83 for (i = 0; encoder->serializer->keys[i] != NULL; i++) {
84 if (strcmp(encoder->serializer->keys[i], key) == 0) {
85 value = p_strdup(encoder->pool, value);
86 array_idx_set(&encoder->values, i, &value);
96 struct dsync_serializer_encoder *encoder = *_encoder;
102 values = array_get(&encoder->values, &count);
116 pool_unref(&encoder->pool);