8000 Add const qualifiers for php_xml · php/php-src@6723e88 · GitHub
[go: up one dir, main page]

Skip to content

Commit 6723e88

Browse files
committed
Add const qualifiers for php_xml
1 parent ba80d0b commit 6723e88

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

ext/soap/php_xml.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ xmlNsPtr node_find_ns(xmlNodePtr node)
203203
}
204204
}
205205

206-
int attr_is_equal_ex(xmlAttrPtr node, char *name, char *ns)
206+
int attr_is_equal_ex(xmlAttrPtr node, const char *name, const char *ns)
207207
{
208208
if (name == NULL || ((node->name) && strcmp((char*)node->name, name) == 0)) {
209209
if (ns) {
@@ -219,7 +219,7 @@ int attr_is_equal_ex(xmlAttrPtr node, char *name, char *ns)
219219
return FALSE;
220220
}
221221

222-
int node_is_equal_ex(xmlNodePtr node, char *name, char *ns)
222+
int node_is_equal_ex(xmlNodePtr node, const char *name, const char *ns)
223223
{
224224
if (name == NULL || ((node->name) && strcmp((char*)node->name, name) == 0)) {
225225
if (ns) {
@@ -236,7 +236,7 @@ int node_is_equal_ex(xmlNodePtr node, char *name, char *ns)
236236
}
237237

238238

239-
xmlAttrPtr get_attribute_ex(xmlAttrPtr node, char *name, char *ns)
239+
xmlAttrPtr get_attribute_ex(xmlAttrPtr node, const char *name, const char *ns)
240240
{
241241
while (node!=NULL) {
242242
if (attr_is_equal_ex(node, name, ns)) {
@@ -247,7 +247,7 @@ xmlAttrPtr get_attribute_ex(xmlAttrPtr node, char *name, char *ns)
247247
return NULL;
248248
}
249249

250-
xmlNodePtr get_node_ex(xmlNodePtr node, char *name, char *ns)
250+
xmlNodePtr get_node_ex(xmlNodePtr node, const char *name, const char *ns)
251251
{
252252
while (node!=NULL) {
253253
if (node_is_equal_ex(node, name, ns)) {
@@ -258,7 +258,7 @@ xmlNodePtr get_node_ex(xmlNodePtr node, char *name, char *ns)
258258
return NULL;
259259
}
260260

261-
xmlNodePtr get_node_recurisve_ex(xmlNodePtr node, char *name, char *ns)
261+
xmlNodePtr get_node_recurisve_ex(xmlNodePtr node, const char *name, const char *ns)
262262
{
263263
while (node != NULL) {
264264
if (node_is_equal_ex(node, name, ns)) {
@@ -274,7 +274,7 @@ xmlNodePtr get_node_recurisve_ex(xmlNodePtr node, char *name, char *ns)
274274
return NULL;
275275
}
276276

277-
xmlNodePtr get_node_with_attribute_ex(xmlNodePtr node, char *name, char *name_ns, char *attribute, char *value, char *attr_ns)
277+
xmlNodePtr get_node_with_attribute_ex(xmlNodePtr node, const char *name, const char *name_ns, const char *attribute, const char *value, const char *attr_ns)
278278
{
279279
xmlAttrPtr attr;
280280

@@ -295,7 +295,7 @@ xmlNodePtr get_node_with_attribute_ex(xmlNodePtr node, char *name, char *name_ns
295295
return NULL;
296296
}
297297

298-
xmlNodePtr get_node_with_attribute_recursive_ex(xmlNodePtr node, char *name, char *name_ns, char *attribute, char *value, char *attr_ns)
298+
xmlNodePtr get_node_with_attribute_recursive_ex(xmlNodePtr node, const char *name, const char *name_ns, const char *attribute, const char *value, const char *attr_ns)
299299
{
300300
while (node != NULL) {
301301
if (node_is_equal_ex(node, name, name_ns)) {

ext/soap/php_xml.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,13 @@ xmlDocPtr soap_xmlParseMemory(const void *buf, size_t size);
3232

3333
xmlNsPtr attr_find_ns(xmlAttrPtr node);
3434
xmlNsPtr node_find_ns(xmlNodePtr node);
35-
int attr_is_equal_ex(xmlAttrPtr node, char *name, char *ns);
36-
int node_is_equal_ex(xmlNodePtr node, char *name, char *ns);
37-
xmlAttrPtr get_attribute_ex(xmlAttrPtr node,char *name, char *ns);
38-
xmlNodePtr get_node_ex(xmlNodePtr node,char *name, char *ns);
39-
xmlNodePtr get_node_recursive_ex(xmlNodePtr node,char *name, char *ns);
40-
xmlNodePtr get_node_with_attribute_ex(xmlNodePtr node, char *name, char *name_ns, char *attribute, char *value, char *attr_ns);
41-
xmlNodePtr get_node_with_attribute_recursive_ex(xmlNodePtr node, char *name, char *name_ns, char *attribute, char *value, char *attr_ns);
35+
int attr_is_equal_ex(xmlAttrPtr node, const char *name, const char *ns);
36+
int node_is_equal_ex(xmlNodePtr node, const char *name, const char *ns);
37+
xmlAttrPtr get_attribute_ex(xmlAttrPtr node,const char *name, const char *ns);
38+
xmlNodePtr get_node_ex(xmlNodePtr node, const char *name, const char *ns);
39+
xmlNodePtr get_node_recursive_ex(xmlNodePtr node, const char *name, const char *ns);
40+
xmlNodePtr get_node_with_attribute_ex(xmlNodePtr node, const char *name, const char *name_ns, const char *attribute, const char *value, const char *attr_ns);
41+
xmlNodePtr get_node_with_attribute_recursive_ex(xmlNodePtr node, const char *name, const char *name_ns, const char *attribute, const char *value, const char *attr_ns);
4242
void parse_namespace(const xmlChar *inval, const char **value, char **namespace);
4343

4444
#define FOREACHNODE(n,c,i) FOREACHNODEEX(n,c,NULL,i)

0 commit comments

Comments
 (0)
0