1
0
Fork 0
mirror of git://git.psyced.org/git/psyclpc synced 2024-08-15 03:20:16 +00:00

libpsyc refactoring

This commit is contained in:
Gabor Adam Toth 2011-11-03 14:28:46 +01:00
parent 24abe02441
commit 86f45a5d4f

View file

@ -176,7 +176,7 @@ fill_header_from_mapping (svalue_t *key, svalue_t *val, void *extra) {
} }
} }
list = psyc_list_new(elems, VEC_SIZE(val->u.vec), PSYC_LIST_CHECK_LENGTH); psyc_list_init(&list, elems, VEC_SIZE(val->u.vec), PSYC_LIST_CHECK_LENGTH);
valuelen = list.length; valuelen = list.length;
value = pxalloc(valuelen); value = pxalloc(valuelen);
if (!value) { if (!value) {
@ -192,8 +192,8 @@ fill_header_from_mapping (svalue_t *key, svalue_t *val, void *extra) {
return; // not reached return; // not reached
} }
m->header->modifiers[m->header->lines++] = psyc_modifier_init(&m->header->modifiers[m->header->lines++],
psyc_modifier_new(oper, name, namelen, value, valuelen, m->flag); oper, name, namelen, value, valuelen, m->flag);
} }
/*-------------------------------------------------------------------------*/ /*-------------------------------------------------------------------------*/
@ -259,12 +259,12 @@ f_psyc_render(svalue_t *sp) {
blen = 0; blen = 0;
} }
packet = psyc_packet_new(headers[PACKET_ROUTING].modifiers, psyc_packet_init(&packet, headers[PACKET_ROUTING].modifiers,
headers[PACKET_ROUTING].lines, headers[PACKET_ROUTING].lines,
headers[PACKET_ENTITY].modifiers, headers[PACKET_ENTITY].modifiers,
headers[PACKET_ENTITY].lines, headers[PACKET_ENTITY].lines,
meth, mlen, body, blen, meth, mlen, body, blen,
PSYC_PACKET_CHECK_LENGTH); PSYC_PACKET_CHECK_LENGTH);
#ifdef DEBUG #ifdef DEBUG
printf("rendering... packet.length = %ld\n", packet.length); printf("rendering... packet.length = %ld\n", packet.length);