1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-09-29 21:49:07 +00:00

cpp-ify prss.c

This commit is contained in:
Nikolas Garofil 2010-02-09 15:24:58 +01:00
parent 526e8d346e
commit 325a29e438
2 changed files with 2 additions and 10 deletions

View File

@ -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) {

View File

@ -20,10 +20,6 @@
#include <libxml/parser.h>
#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 */