libidav/davqlexec.c

branch
dav-2
changeset 920
92fcd6a8cf9e
parent 893
38800d479cd4
equal deleted inserted replaced
919:7f250903d903 920:92fcd6a8cf9e
500 } 500 }
501 DavCompiledField *cfield = cxMalloc( 501 DavCompiledField *cfield = cxMalloc(
502 mp->allocator, 502 mp->allocator,
503 sizeof(DavCompiledField)); 503 sizeof(DavCompiledField));
504 504
505 char *ns; 505 const char *ns;
506 char *name; 506 const char *name;
507 dav_get_property_namespace_str( 507 dav_get_property_namespace_str(
508 sn->context, 508 sn->context,
509 cx_strdup_a(mp->allocator, field->name).ptr, 509 cx_strdup_a(mp->allocator, field->name).ptr,
510 &ns, 510 &ns,
511 &name); 511 &name);
551 if(column->type == DAVQL_IDENTIFIER) { 551 if(column->type == DAVQL_IDENTIFIER) {
552 // TODO: remove code duplication (add_cmd) 552 // TODO: remove code duplication (add_cmd)
553 davqlresprop_t resprop; 553 davqlresprop_t resprop;
554 cxstring propertyname = cx_strchr(column->srctext, ':'); 554 cxstring propertyname = cx_strchr(column->srctext, ':');
555 if(propertyname.length > 0) { 555 if(propertyname.length > 0) {
556 char *ns; 556 const char *ns;
557 char *name; 557 const char *name;
558 dav_get_property_namespace_str( 558 dav_get_property_namespace_str(
559 sn->context, 559 sn->context,
560 cx_strdup_a(mp->allocator, column->srctext).ptr, 560 cx_strdup_a(mp->allocator, column->srctext).ptr,
561 &ns, 561 &ns,
562 &name); 562 &name);
818 case DAVQL_IDENTIFIER: { 818 case DAVQL_IDENTIFIER: {
819 cxstring propertyname = cx_strchr(src, ':'); 819 cxstring propertyname = cx_strchr(src, ':');
820 cmd.type = DAVQL_CMD_RES_IDENTIFIER; 820 cmd.type = DAVQL_CMD_RES_IDENTIFIER;
821 if(propertyname.length > 0) { 821 if(propertyname.length > 0) {
822 cmd.type = DAVQL_CMD_PROP_IDENTIFIER; 822 cmd.type = DAVQL_CMD_PROP_IDENTIFIER;
823 char *ns; 823 const char *ns;
824 char *name; 824 const char *name;
825 dav_get_property_namespace_str( 825 dav_get_property_namespace_str(
826 ctx, 826 ctx,
827 cx_strdup_a(a, src).ptr, 827 cx_strdup_a(a, src).ptr,
828 &ns, 828 &ns,
829 &name); 829 &name);
830 if(ns && name) { 830 if(ns && name) {
831 cmd.data.property.ns = ns; 831 cmd.data.property.ns = (char*)ns;
832 cmd.data.property.name = name; 832 cmd.data.property.name = (char*)name;
833 } else { 833 } else {
834 // error 834 // error
835 return -1; 835 return -1;
836 } 836 }
837 } else if(!dav_identifier2resprop(src, &cmd.data.resprop)) { 837 } else if(!dav_identifier2resprop(src, &cmd.data.resprop)) {

mercurial