Skip to content

Commit cb5c303

Browse files
committed
ext/soap: add const qualifiers to soap fault functions
1 parent 53d0b0e commit cb5c303

2 files changed

Lines changed: 12 additions & 12 deletions

File tree

ext/soap/php_soap.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ extern zend_class_entry* soap_sdl_class_entry;
195195

196196
extern HashTable php_soap_defEncNs, php_soap_defEnc, php_soap_defEncIndex;
197197

198-
void add_soap_fault(zval *obj, char *fault_code, char *fault_string, char *fault_actor, zval *fault_detail, zend_string *lang);
198+
void add_soap_fault(zval *obj, const char *fault_code, const char *fault_string, const char *fault_actor, zval *fault_detail, zend_string *lang);
199199

200200
#define soap_error0(severity, format) \
201201
php_error(severity, "SOAP-ERROR: " format)

ext/soap/soap.c

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,12 @@ static void type_to_string(sdlTypePtr type, smart_str *buf, int level);
4949

5050
static void clear_soap_fault(zval *obj);
5151
static void set_soap_fault(zval *obj, const char *fault_code_ns, const char *fault_code, const char *fault_string, const char *fault_actor, zval *fault_detail, zend_string *name, zend_string *lang);
52-
static void add_soap_fault_en(zval *obj, char *fault_code, char *fault_string);
53-
static void add_soap_fault_ex(zval *fault, zval *obj, char *fault_code, char *fault_string, char *fault_actor, zval *fault_detail, zend_string *lang);
54-
static void add_soap_fault_ex_en(zval *fault, zval *obj, char *fault_code, char *fault_string);
55-
static ZEND_NORETURN void soap_server_fault(char* code, char* string, char *actor, zval* details, zend_string *name, zend_string *lang);
52+
static void add_soap_fault_en(zval *obj, const char *fault_code, const char *fault_string);
53+
static void add_soap_fault_ex(zval *fault, zval *obj, const char *fault_code, const char *fault_string, const char *fault_actor, zval *fault_detail, zend_string *lang);
54+
static void add_soap_fault_ex_en(zval *fault, zval *obj, const char *fault_code, const char *fault_string);
55+
static ZEND_NORETURN void soap_server_fault(const char *code, const char *string, const char *actor, zval* details, zend_string *name, zend_string *lang);
5656
static void soap_server_fault_ex(sdlFunctionPtr function, zval* fault, soapHeader* hdr);
57-
static ZEND_NORETURN void soap_server_fault_en(char* code, char* string, char *actor, zval* details, zend_string *name);
57+
static ZEND_NORETURN void soap_server_fault_en(const char *code, const char *string, const char *actor, zval* details, zend_string *name);
5858

5959
static sdlParamPtr get_param(sdlFunctionPtr function, const char *param_name, zend_ulong index, int);
6060
static sdlFunctionPtr get_function(sdlPtr sdl, const char *function_name, size_t function_name_length);
@@ -1875,7 +1875,7 @@ static void soap_server_fault_ex(sdlFunctionPtr function, zval* fault, soapHeade
18751875
}
18761876
/* }}} */
18771877

1878-
static ZEND_NORETURN void soap_server_fault(char* code, char* string, char *actor, zval* details, zend_string* name, zend_string *lang) /* {{{ */
1878+
static ZEND_NORETURN void soap_server_fault(const char *code, const char *string, const char *actor, zval* details, zend_string* name, zend_string *lang) /* {{{ */
18791879
{
18801880
zval ret;
18811881

@@ -1887,7 +1887,7 @@ static ZEND_NORETURN void soap_server_fault(char* code, char* string, char *acto
18871887
}
18881888
/* }}} */
18891889

1890-
static ZEND_NORETURN void soap_server_fault_en(char* code, char* string, char *actor, zval* details, zend_string* name)
1890+
static ZEND_NORETURN void soap_server_fault_en(const char *code, const char *string, const char *actor, zval* details, zend_string* name)
18911891
{
18921892
soap_server_fault(code, string, actor, details, name, soap_lang_en);
18931893
}
@@ -2953,7 +2953,7 @@ static void clear_soap_fault(zval *obj) /* {{{ */
29532953
}
29542954
/* }}} */
29552955

2956-
static void add_soap_fault_ex(zval *fault, zval *obj, char *fault_code, char *fault_string, char *fault_actor, zval *fault_detail, zend_string *lang) /* {{{ */
2956+
static void add_soap_fault_ex(zval *fault, zval *obj, const char *fault_code, const char *fault_string, const char *fault_actor, zval *fault_detail, zend_string *lang) /* {{{ */
29572957
{
29582958
ZVAL_NULL(fault);
29592959
set_soap_fault(fault, NULL, fault_code, fault_string, fault_actor, fault_detail, NULL, lang);
@@ -2970,19 +2970,19 @@ static void add_soap_fault_ex(zval *fault, zval *obj, char *fault_code, char *fa
29702970
}
29712971
/* }}} */
29722972

2973-
static void add_soap_fault_ex_en(zval *fault, zval *obj, char *fault_code, char *fault_string)
2973+
static void add_soap_fault_ex_en(zval *fault, zval *obj, const char *fault_code, const char *fault_string)
29742974
{
29752975
add_soap_fault_ex(fault, obj, fault_code, fault_string, NULL, NULL, soap_lang_en);
29762976
}
29772977

2978-
void add_soap_fault(zval *obj, char *fault_code, char *fault_string, char *fault_actor, zval *fault_detail, zend_string *lang) /* {{{ */
2978+
void add_soap_fault(zval *obj, const char *fault_code, const char *fault_string, const char *fault_actor, zval *fault_detail, zend_string *lang) /* {{{ */
29792979
{
29802980
zval fault;
29812981
add_soap_fault_ex(&fault, obj, fault_code, fault_string, fault_actor, fault_detail, lang);
29822982
}
29832983
/* }}} */
29842984

2985-
static void add_soap_fault_en(zval *obj, char *fault_code, char *fault_string)
2985+
static void add_soap_fault_en(zval *obj, const char *fault_code, const char *fault_string)
29862986
{
29872987
add_soap_fault(obj, fault_code, fault_string, NULL, NULL, soap_lang_en);
29882988
}

0 commit comments

Comments
 (0)