summaryrefslogtreecommitdiff
path: root/include/dom/core
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2007-07-14 14:30:41 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2007-07-14 14:30:41 +0000
commit98d768777e8ec0cf124a5fcfbcd4f34c2b6c8182 (patch)
tree3495117daa6e1c770fd64be073987d44ca96e9d6 /include/dom/core
parent353ab0fbe152e97a06b59493b012cea921c31afc (diff)
downloadlibdom-98d768777e8ec0cf124a5fcfbcd4f34c2b6c8182.tar.gz
libdom-98d768777e8ec0cf124a5fcfbcd4f34c2b6c8182.tar.bz2
Add extra dom_string constructor that permits strings to be manufactured in the situation where there exists no document.
This should only be used in order to create dom_strings for use by DocumentType and Document constructors -- in any other situation, a suitable document already exists. svn path=/trunk/dom/; revision=3411
Diffstat (limited to 'include/dom/core')
-rw-r--r--include/dom/core/string.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/dom/core/string.h b/include/dom/core/string.h
index 759f042..c9ffd97 100644
--- a/include/dom/core/string.h
+++ b/include/dom/core/string.h
@@ -11,6 +11,7 @@
#include <inttypes.h>
#include <stddef.h>
+#include <dom/functypes.h>
#include <dom/core/exceptions.h>
struct dom_document;
@@ -30,6 +31,10 @@ dom_exception dom_string_create_from_ptr(struct dom_document *doc,
/* Create a DOM string from a constant string of characters */
dom_exception dom_string_create_from_const_ptr(struct dom_document *doc,
const uint8_t *ptr, size_t len, struct dom_string **str);
+/* Create a DOM string from a string of characters that does not belong
+ * to a document */
+dom_exception dom_string_create_from_ptr_no_doc(dom_alloc alloc, void *pw,
+ const uint8_t *ptr, size_t len, struct dom_string **str);
/* Get a pointer to the string of characters within a DOM string */
dom_exception dom_string_get_data(struct dom_string *str,