From: Adam Dickmeiss Date: Fri, 21 Mar 2014 10:48:22 +0000 (+0100) Subject: Rename yaz_use_attribute_create to zget_AttributeList_use_string X-Git-Tag: v5.0.21~2 X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=commitdiff_plain;h=01e36a11adc97a240cc595f89280c8a619770251;hp=aab0b586a68a6d8df06b045d8043b434c0234bea Rename yaz_use_attribute_create to zget_AttributeList_use_string --- diff --git a/include/yaz/proto.h b/include/yaz/proto.h index a5115e8..6380341 100644 --- a/include/yaz/proto.h +++ b/include/yaz/proto.h @@ -199,7 +199,7 @@ Z_DefaultDiagFormat *yaz_decode_init_diag(int no, Z_InitResponse *initrs); \returns attribute list with only one use-attribute */ YAZ_EXPORT -Z_AttributeList *yaz_use_attribute_create(ODR o, const char *name); +Z_AttributeList *zget_AttributeList_use_string(ODR o, const char *name); YAZ_END_CDECL diff --git a/src/pquery.c b/src/pquery.c index 3fdabe9..f913a0f 100644 --- a/src/pquery.c +++ b/src/pquery.c @@ -307,10 +307,10 @@ static Z_AttributeList *get_attributeList(ODR o, return attributes; } -Z_AttributeList *yaz_use_attribute_create(ODR o, const char *name) +Z_AttributeList *zget_AttributeList_use_string(ODR o, const char *name) { Odr_int attr_list[2]; - const char *attr_clist[1]; + char *attr_clist[1]; Odr_oid *attr_set[1]; attr_list[0] = 1; diff --git a/src/solr.c b/src/solr.c index 4ae57bb..c1c1bba 100644 --- a/src/solr.c +++ b/src/solr.c @@ -154,7 +154,7 @@ Z_FacetField *yaz_solr_decode_facet_field(ODR o, xmlNodePtr ptr, xmlNodePtr node; // USE attribute const char* name = yaz_element_attribute_value_get(ptr, "lst", "name"); - list = yaz_use_attribute_create(o, name); + list = zget_AttributeList_use_string(o, name); for (node = ptr->children; node; node = node->next) num_terms++; facet_field = facet_field_create(o, list, num_terms); diff --git a/src/sru_facet.c b/src/sru_facet.c index 6802b15..7821f66 100644 --- a/src/sru_facet.c +++ b/src/sru_facet.c @@ -259,8 +259,8 @@ void yaz_sru_facet_response(ODR o, Z_FacetList **facetList, xmlNodePtr n) p_terms = p2; } if (index_name) - ff->attributes = yaz_use_attribute_create(o, - index_name); + ff->attributes = + zget_AttributeList_use_string(o, index_name); if (p_terms) { xmlNode *p; diff --git a/src/srw.c b/src/srw.c index f4a6453..5076ecc 100644 --- a/src/srw.c +++ b/src/srw.c @@ -308,7 +308,7 @@ static Z_FacetField *yaz_sru_proxy_decode_facet_field(ODR odr, xmlNodePtr ptr) const char* name = yaz_element_attribute_value_get(ptr, "facet", "code"); yaz_log(YLOG_DEBUG, "sru-proxy facet type: %s", name); - list = yaz_use_attribute_create(odr, name); + list = zget_AttributeList_use_string(odr, name); for (node = ptr->children; node; node = node->next) { if (yaz_match_xsd_element(node, "facetvalue")) num_terms++;