diff --git a/src/prss.cc b/src/prss.cc index fe8a5af9..72a7e86c 100644 --- a/src/prss.cc +++ b/src/prss.cc @@ -191,7 +191,7 @@ static inline int parse_rss_2_0(PRSS *res, xmlNodePtr root) if (res->version) free(res->version); res->version = strndup("2.0", text_buffer_size); if (res->items) free_rss_items(res); - res->items = malloc(items * sizeof(PRSS_Item)); + res->items = (PRSS_Item*) malloc(items * sizeof(PRSS_Item)); res->item_count = 0; for (n = channel->children; n; n = n->next) { @@ -224,7 +224,7 @@ static inline int parse_rss_1_0(PRSS *res, xmlNodePtr root) if (res->version) free(res->version); res->version = strndup("1.0", text_buffer_size); if (res->items) free_rss_items(res); - res->items = malloc(items * sizeof(PRSS_Item)); + res->items = (PRSS_Item*) malloc(items * sizeof(PRSS_Item)); res->item_count = 0; for (n = root->children; n; n = n->next) { diff --git a/src/prss.h b/src/prss.h index e202019c..4da4cbb5 100644 --- a/src/prss.h +++ b/src/prss.h @@ -20,10 +20,6 @@ #include -#ifdef __cplusplus -extern "C" { -#endif - typedef struct PRSS_Item_ { char *title; char *link; @@ -64,8 +60,4 @@ PRSS *prss_parse_doc(xmlDocPtr doc); */ * after call to this function. */ void prss_free(PRSS *data); -#ifdef __cplusplus -} -#endif - #endif /* PRSS_H */