31#define CORESTRING_LWC_VALUE(NAME,VALUE) lwc_string *corestring_lwc_##NAME
32#define CORESTRING_DOM_VALUE(NAME,VALUE) dom_string *corestring_dom_##NAME
33#define CORESTRING_NSURL(NAME,VALUE) nsurl *corestring_nsurl_##NAME
35#undef CORESTRING_LWC_VALUE
36#undef CORESTRING_DOM_VALUE
37#undef CORESTRING_NSURL
42#define CORESTRING_LWC_VALUE(NAME,VALUE) \
44 if (corestring_lwc_##NAME != NULL) { \
45 lwc_string_unref(corestring_lwc_##NAME); \
46 corestring_lwc_##NAME = NULL; \
50#define CORESTRING_DOM_VALUE(NAME,VALUE) \
52 if (corestring_dom_##NAME != NULL) { \
53 dom_string_unref(corestring_dom_##NAME); \
54 corestring_dom_##NAME = NULL; \
58#define CORESTRING_NSURL(NAME,VALUE) \
60 if (corestring_nsurl_##NAME != NULL) { \
61 nsurl_unref(corestring_nsurl_##NAME); \
62 corestring_nsurl_##NAME = NULL; \
69#undef CORESTRING_LWC_VALUE
70#undef CORESTRING_DOM_VALUE
71#undef CORESTRING_NSURL
84#define CORESTRING_LWC_VALUE(NAME,VALUE) \
86 lerror = lwc_intern_string( \
87 (const char *)VALUE, \
89 &corestring_lwc_##NAME ); \
90 if ((lerror != lwc_error_ok) || \
91 (corestring_lwc_##NAME == NULL)) { \
92 error = NSERROR_NOMEM; \
97#define CORESTRING_DOM_VALUE(NAME,VALUE) \
99 exc = dom_string_create_interned( \
100 (const uint8_t *)VALUE, \
102 &corestring_dom_##NAME ); \
103 if ((exc != DOM_NO_ERR) || \
104 (corestring_dom_##NAME == NULL)) { \
105 error = NSERROR_NOMEM; \
110#define CORESTRING_NSURL(NAME,VALUE) \
112 error = nsurl_create(VALUE, \
113 &corestring_nsurl_##NAME); \
114 if (error != NSERROR_OK) { \
121#undef CORESTRING_LWC_VALUE
122#undef CORESTRING_DOM_VALUE
123#undef CORESTRING_NSURL
nserror corestrings_fini(void)
free resources of core string tables.
nserror corestrings_init(void)
Initialise the core string tables.
Useful interned string pointers (interface).
nserror
Enumeration of error codes.
NetSurf URL handling (interface).
Interface to a number of general purpose functionality.