From 82e95d0435ce6b91a820764a40a9518c4c2e992c Mon Sep 17 00:00:00 2001 From: Daniel Silverstone Date: Wed, 28 Mar 2012 20:45:27 +0000 Subject: Remove dom_string casts in API macros to help prevent issues like that fixed in r13764 happening again svn path=/trunk/libdom/; revision=13766 --- include/dom/html/html_document.h | 29 ++++++++++------------------- include/dom/html/html_element.h | 20 ++++++++++---------- 2 files changed, 20 insertions(+), 29 deletions(-) (limited to 'include') diff --git a/include/dom/html/html_document.h b/include/dom/html/html_document.h index ca9727a..1f868a5 100644 --- a/include/dom/html/html_document.h +++ b/include/dom/html/html_document.h @@ -69,8 +69,7 @@ static inline dom_exception dom_html_document_get_title( get_title(doc, title); } #define dom_html_document_get_title(d, t) \ - dom_html_document_get_title((dom_html_document *) (d), \ - (dom_string **) (t)) + dom_html_document_get_title((dom_html_document *) (d), (t)) static inline dom_exception dom_html_document_set_title(dom_html_document *doc, dom_string *title) @@ -79,8 +78,7 @@ static inline dom_exception dom_html_document_set_title(dom_html_document *doc, set_title(doc, title); } #define dom_html_document_set_title(d, t) \ - dom_html_document_set_title((dom_html_document *) (d), \ - (dom_string **) (t)) + dom_html_document_set_title((dom_html_document *) (d), (t)) static inline dom_exception dom_html_document_get_referrer(dom_html_document *doc, dom_string **referrer) @@ -89,8 +87,7 @@ static inline dom_exception dom_html_document_get_referrer(dom_html_document *do get_referrer(doc, referrer); } #define dom_html_document_get_referrer(d, r) \ - dom_html_document_get_referrer((dom_html_document *) (d), \ - (dom_string **) (r)) + dom_html_document_get_referrer((dom_html_document *) (d), (r)) static inline dom_exception dom_html_document_get_domain(dom_html_document *doc, dom_string **domain) @@ -99,8 +96,7 @@ static inline dom_exception dom_html_document_get_domain(dom_html_document *doc, get_domain(doc, domain); } #define dom_html_document_get_domain(d, t) \ - dom_html_document_get_domain((dom_html_document *) (d), \ - (dom_string **) (t)) + dom_html_document_get_domain((dom_html_document *) (d), (t)) static inline dom_exception dom_html_document_get_url(dom_html_document *doc, dom_string **url) @@ -109,8 +105,7 @@ static inline dom_exception dom_html_document_get_url(dom_html_document *doc, get_url(doc, url); } #define dom_html_document_get_url(d, u) \ - dom_html_document_get_url((dom_html_document *) (d), \ - (dom_string **) (u)) + dom_html_document_get_url((dom_html_document *) (d), (u)) static inline dom_exception dom_html_document_get_body(dom_html_document *doc, struct dom_html_element **body) @@ -189,8 +184,7 @@ static inline dom_exception dom_html_document_get_cookie(dom_html_document *doc, get_cookie(doc, cookie); } #define dom_html_document_get_cookie(d, c) \ - dom_html_document_get_title((dom_html_document *) (d), \ - (dom_string **) (c)) + dom_html_document_get_title((dom_html_document *) (d), (c)) static inline dom_exception dom_html_document_set_cookie(dom_html_document *doc, dom_string *cookie) @@ -199,8 +193,7 @@ static inline dom_exception dom_html_document_set_cookie(dom_html_document *doc, set_cookie(doc, cookie); } #define dom_html_document_set_cookie(d, c) \ - dom_html_document_set_cookie((dom_html_document *) (d), \ - (dom_string **) (c)) + dom_html_document_set_cookie((dom_html_document *) (d), (c)) static inline dom_exception dom_html_document_open(dom_html_document *doc) @@ -227,8 +220,7 @@ static inline dom_exception dom_html_document_write(dom_html_document *doc, write(doc, text); } #define dom_html_document_write(d, t) \ - dom_html_document_write((dom_html_document *) (d), \ - (dom_string *) (t)) + dom_html_document_write((dom_html_document *) (d), (t)) static inline dom_exception dom_html_document_writeln(dom_html_document *doc, dom_string *text) @@ -237,8 +229,7 @@ static inline dom_exception dom_html_document_writeln(dom_html_document *doc, writeln(doc, text); } #define dom_html_document_writeln(d, t) \ - dom_html_document_writeln((dom_html_document *) (d), \ - (dom_string *) (t)) + dom_html_document_writeln((dom_html_document *) (d), (t)) static inline dom_exception dom_html_document_get_elements_by_name(dom_html_document *doc, dom_string *name, struct dom_nodelist **list) @@ -248,7 +239,7 @@ static inline dom_exception dom_html_document_get_elements_by_name(dom_html_docu } #define dom_html_document_get_elements_by_name(d, n, l) \ dom_html_document_get_element_by_name((dom_html_document *) (d), \ - (dom_string *) (n), (struct dom_nodelist **) (l)) + (n), (struct dom_nodelist **) (l)) #endif diff --git a/include/dom/html/html_element.h b/include/dom/html/html_element.h index 1c5f223..1b40e25 100644 --- a/include/dom/html/html_element.h +++ b/include/dom/html/html_element.h @@ -44,7 +44,7 @@ static inline dom_exception dom_html_element_get_id(struct dom_html_element *ele dom_html_element_get_id(element, id); } #define dom_html_element_get_id(e, id) dom_html_element_get_id( \ - (dom_html_element *) (e), (dom_string **) (id)) + (dom_html_element *) (e), (id)) static inline dom_exception dom_html_element_set_id(struct dom_html_element *element, dom_string *id) @@ -53,7 +53,7 @@ static inline dom_exception dom_html_element_set_id(struct dom_html_element *ele dom_html_element_set_id(element, id); } #define dom_html_element_set_id(e, id) dom_html_element_set_id( \ - (dom_html_element *) (e), (dom_string *) (id)) + (dom_html_element *) (e), (id)) static inline dom_exception dom_html_element_get_title(struct dom_html_element *element, dom_string **title) @@ -62,7 +62,7 @@ static inline dom_exception dom_html_element_get_title(struct dom_html_element * dom_html_element_get_title(element, title); } #define dom_html_element_get_title(e, title) dom_html_element_get_title( \ - (dom_html_element *) (e), (dom_string **) (title)) + (dom_html_element *) (e), (title)) static inline dom_exception dom_html_element_set_title(struct dom_html_element *element, dom_string *title) @@ -71,7 +71,7 @@ static inline dom_exception dom_html_element_set_title(struct dom_html_element * dom_html_element_set_title(element, title); } #define dom_html_element_set_title(e, title) dom_html_element_set_title( \ - (dom_html_element *) (e), (dom_string *) (title)) + (dom_html_element *) (e), (title)) static inline dom_exception dom_html_element_get_lang(struct dom_html_element *element, dom_string **lang) @@ -80,7 +80,7 @@ static inline dom_exception dom_html_element_get_lang(struct dom_html_element *e dom_html_element_get_lang(element, lang); } #define dom_html_element_get_lang(e, lang) dom_html_element_get_lang( \ - (dom_html_element *) (e), (dom_string **) (lang)) + (dom_html_element *) (e), (lang)) static inline dom_exception dom_html_element_set_lang(struct dom_html_element *element, dom_string *lang) @@ -89,7 +89,7 @@ static inline dom_exception dom_html_element_set_lang(struct dom_html_element *e dom_html_element_set_lang(element, lang); } #define dom_html_element_set_lang(e, lang) dom_html_element_set_lang( \ - (dom_html_element *) (e), (dom_string *) (lang)) + (dom_html_element *) (e), (lang)) static inline dom_exception dom_html_element_get_dir(struct dom_html_element *element, dom_string **dir) @@ -98,7 +98,7 @@ static inline dom_exception dom_html_element_get_dir(struct dom_html_element *el dom_html_element_get_dir(element, dir); } #define dom_html_element_get_dir(e, dir) dom_html_element_get_dir( \ - (dom_html_element *) (e), (dom_string **) (dir)) + (dom_html_element *) (e), (dir)) static inline dom_exception dom_html_element_set_dir(struct dom_html_element *element, dom_string *dir) @@ -107,7 +107,7 @@ static inline dom_exception dom_html_element_set_dir(struct dom_html_element *el dom_html_element_set_dir(element, dir); } #define dom_html_element_set_dir(e, dir) dom_html_element_set_dir( \ - (dom_html_element *) (e), (dom_string *) (dir)) + (dom_html_element *) (e), (dir)) static inline dom_exception dom_html_element_get_classname(struct dom_html_element *element, dom_string **classname) @@ -116,7 +116,7 @@ static inline dom_exception dom_html_element_get_classname(struct dom_html_eleme dom_html_element_get_classname(element, classname); } #define dom_html_element_get_classname(e, classname) dom_html_element_get_classname( \ - (dom_html_element *) (e), (dom_string **) (classname)) + (dom_html_element *) (e), (classname)) static inline dom_exception dom_html_element_set_classname(struct dom_html_element *element, dom_string *classname) @@ -125,7 +125,7 @@ static inline dom_exception dom_html_element_set_classname(struct dom_html_eleme dom_html_element_set_classname(element, classname); } #define dom_html_element_set_classname(e, classname) dom_html_element_set_classname( \ - (dom_html_element *) (e), (dom_string *) (classname)) + (dom_html_element *) (e), (classname)) #endif -- cgit v1.2.3