php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #54712
Patch php-trunk-zend revision 2011-05-12 07:58 UTC by chantry dot xavier at gmail dot com
Patch php-5.3-zend.diff revision 2011-05-12 07:08 UTC by chantry dot xavier at gmail dot com

Patch php-trunk-zend for Compile Warning Bug #54712

Patch version 2011-05-12 07:58 UTC

Return to Bug #54712 | Download this patch
Patch Revisions:

Developer: chantry.xavier@gmail.com

Index: zend_ini.h
===================================================================
--- zend_ini.h	(revision 310963)
+++ zend_ini.h	(working copy)
@@ -57,23 +57,23 @@
 
 #endif
 
-#define ZEND_INI_MH(name) int name(zend_ini_entry *entry, char *new_value, uint new_value_length, void *mh_arg1, void *mh_arg2, void *mh_arg3, int stage TSRMLS_DC)
+#define ZEND_INI_MH(name) int name(zend_ini_entry *entry, const char *new_value, uint new_value_length, void *mh_arg1, void *mh_arg2, void *mh_arg3, int stage TSRMLS_DC)
 #define ZEND_INI_DISP(name) void name(zend_ini_entry *ini_entry, int type)
 
 struct _zend_ini_entry {
 	int module_number;
 	int modifiable;
-	char *name;
+	const char *name;
 	uint name_length;
 	ZEND_INI_MH((*on_modify));
 	void *mh_arg1;
 	void *mh_arg2;
 	void *mh_arg3;
 
-	char *value;
+	const char *value;
 	uint value_length;
 
-	char *orig_value;
+	const char *orig_value;
 	uint orig_value_length;
 	int orig_modifiable;
 	int modified;
@@ -94,17 +94,17 @@
 ZEND_API int zend_register_ini_entries(const zend_ini_entry *ini_entry, int module_number TSRMLS_DC);
 ZEND_API void zend_unregister_ini_entries(int module_number TSRMLS_DC);
 ZEND_API void zend_ini_refresh_caches(int stage TSRMLS_DC);
-ZEND_API int zend_alter_ini_entry(char *name, uint name_length, char *new_value, uint new_value_length, int modify_type, int stage);
-ZEND_API int zend_alter_ini_entry_ex(char *name, uint name_length, char *new_value, uint new_value_length, int modify_type, int stage, int force_change TSRMLS_DC);
-ZEND_API int zend_restore_ini_entry(char *name, uint name_length, int stage);
+ZEND_API int zend_alter_ini_entry(const char *name, uint name_length, const char *new_value, uint new_value_length, int modify_type, int stage);
+ZEND_API int zend_alter_ini_entry_ex(const char *name, uint name_length, const char *new_value, uint new_value_length, int modify_type, int stage, int force_change TSRMLS_DC);
+ZEND_API int zend_restore_ini_entry(const char *name, uint name_length, int stage);
 ZEND_API void display_ini_entries(zend_module_entry *module);
 
-ZEND_API long zend_ini_long(char *name, uint name_length, int orig);
-ZEND_API double zend_ini_double(char *name, uint name_length, int orig);
-ZEND_API char *zend_ini_string(char *name, uint name_length, int orig);
-ZEND_API char *zend_ini_string_ex(char *name, uint name_length, int orig, zend_bool *exists);
+ZEND_API long zend_ini_long(const char *name, uint name_length, int orig);
+ZEND_API double zend_ini_double(const char *name, uint name_length, int orig);
+ZEND_API char *zend_ini_string(const char *name, uint name_length, int orig);
+ZEND_API char *zend_ini_string_ex(const char *name, uint name_length, int orig, zend_bool *exists);
 
-ZEND_API int zend_ini_register_displayer(char *name, uint name_length, void (*displayer)(zend_ini_entry *ini_entry, int type));
+ZEND_API int zend_ini_register_displayer(const char *name, uint name_length, void (*displayer)(zend_ini_entry *ini_entry, int type));
 
 ZEND_API ZEND_INI_DISP(zend_ini_boolean_displayer_cb);
 ZEND_API ZEND_INI_DISP(zend_ini_color_displayer_cb);
@@ -195,7 +195,7 @@
 typedef void (*zend_ini_parser_cb_t)(zval *arg1, zval *arg2, zval *arg3, int callback_type, void *arg TSRMLS_DC);
 BEGIN_EXTERN_C()
 ZEND_API int zend_parse_ini_file(zend_file_handle *fh, zend_bool unbuffered_errors, int scanner_mode, zend_ini_parser_cb_t ini_parser_cb, void *arg TSRMLS_DC);
-ZEND_API int zend_parse_ini_string(char *str, zend_bool unbuffered_errors, int scanner_mode, zend_ini_parser_cb_t ini_parser_cb, void *arg TSRMLS_DC);
+ZEND_API int zend_parse_ini_string(const char *str, zend_bool unbuffered_errors, int scanner_mode, zend_ini_parser_cb_t ini_parser_cb, void *arg TSRMLS_DC);
 END_EXTERN_C()
 
 /* INI entries */
Index: zend_constants.h
===================================================================
--- zend_constants.h	(revision 310963)
+++ zend_constants.h	(working copy)
@@ -64,8 +64,8 @@
 ZEND_API int zend_get_constant_ex(const char *name, uint name_len, zval *result, zend_class_entry *scope, ulong flags TSRMLS_DC);
 ZEND_API void zend_register_long_constant(const char *name, uint name_len, long lval, int flags, int module_number TSRMLS_DC);
 ZEND_API void zend_register_double_constant(const char *name, uint name_len, double dval, int flags, int module_number TSRMLS_DC);
-ZEND_API void zend_register_string_constant(const char *name, uint name_len, char *strval, int flags, int module_number TSRMLS_DC);
-ZEND_API void zend_register_stringl_constant(const char *name, uint name_len, char *strval, uint strlen, int flags, int module_number TSRMLS_DC);
+ZEND_API void zend_register_string_constant(const char *name, uint name_len, const char *strval, int flags, int module_number TSRMLS_DC);
+ZEND_API void zend_register_stringl_constant(const char *name, uint name_len, const char *strval, uint strlen, int flags, int module_number TSRMLS_DC);
 ZEND_API int zend_register_constant(zend_constant *c TSRMLS_DC);
 void zend_copy_constants(HashTable *target, HashTable *sourc);
 void copy_zend_constant(zend_constant *c);
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 16:01:28 2024 UTC