php-internal-docs 8.4.8
Unofficial docs for php/php-src
Loading...
Searching...
No Matches
text.c
Go to the documentation of this file.
1/*
2 * Copyright (C) 2018-2021 Alexander Borisov
3 *
4 * Author: Alexander Borisov <borisov@lexbor.com>
5 */
6
9
10
13{
14 lxb_dom_text_t *element;
15
16 element = lexbor_mraw_calloc(document->mraw,
17 sizeof(lxb_dom_text_t));
18 if (element == NULL) {
19 return NULL;
20 }
21
23
24 node->owner_document = lxb_dom_document_owner(document);
26
27 return element;
28}
29
32 const lxb_dom_text_t *text)
33{
35 lxb_dom_text_t *new;
36
37 new = lxb_dom_text_interface_create(document);
38 if (new == NULL) {
39 return NULL;
40 }
41
43 if (status != LXB_STATUS_OK) {
45 }
46
47 return new;
48}
49
57
lxb_dom_character_data_t * lxb_dom_character_data_interface_destroy(lxb_dom_character_data_t *character_data)
lxb_status_t lxb_dom_character_data_interface_copy(lxb_dom_character_data_t *dst, const lxb_dom_character_data_t *src)
@ LXB_STATUS_OK
Definition base.h:49
DNS_STATUS status
Definition dns_win32.c:49
struct lxb_dom_document lxb_dom_document_t
Definition interface.h:41
#define lxb_dom_interface_node(obj)
Definition interface.h:31
struct lxb_dom_node lxb_dom_node_t
Definition interface.h:38
struct lxb_dom_text lxb_dom_text_t
Definition interface.h:46
#define lxb_dom_interface_character_data(obj)
Definition interface.h:23
lxb_inline lxb_dom_document_t * lxb_dom_document_owner(lxb_dom_document_t *document)
Definition document.h:198
@ LXB_DOM_NODE_TYPE_TEXT
Definition node.h:27
#define NULL
Definition gdcache.h:45
lxb_dom_text_t * lxb_dom_text_interface_clone(lxb_dom_document_t *document, const lxb_dom_text_t *text)
Definition text.c:31
lxb_dom_text_t * lxb_dom_text_interface_create(lxb_dom_document_t *document)
Definition text.c:12
lxb_status_t lxb_dom_text_interface_copy(lxb_dom_text_t *dst, const lxb_dom_text_t *src)
Definition text.c:59
lxb_dom_text_t * lxb_dom_text_interface_destroy(lxb_dom_text_t *text)
Definition text.c:51
void * lexbor_mraw_calloc(lexbor_mraw_t *mraw, size_t size)
Definition mraw.c:227
unsigned const char * text
Definition php_ffi.h:53
lexbor_mraw_t * mraw
Definition document.h:53
lxb_dom_document_t * owner_document
Definition node.h:50
lxb_dom_node_type_t type
Definition node.h:59
lxb_dom_character_data_t char_data
Definition text.h:19
unsigned int lxb_status_t
Definition types.h:28
ZEND_API void(ZEND_FASTCALL *zend_touch_vm_stack_data)(void *vm_stack_data)