From 98d768777e8ec0cf124a5fcfbcd4f34c2b6c8182 Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Sat, 14 Jul 2007 14:30:41 +0000 Subject: 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 --- include/dom/core/string.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include') 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 #include +#include #include 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, -- cgit v1.2.3