]> granicus.if.org Git - php/commitdiff
Use size_t as parameter type in the getenv member of struct sapi_module
authorSascha Schumann <sas@php.net>
Sun, 20 Aug 2000 14:20:21 +0000 (14:20 +0000)
committerSascha Schumann <sas@php.net>
Sun, 20 Aug 2000 14:20:21 +0000 (14:20 +0000)
main/SAPI.c
main/SAPI.h
sapi/apache/mod_php4.c

index 040f23af77864822694730d16937f81e4723668b..60b886fd0abd0f96a10b1ff5ea6e8e7ab6e8a9e6 100644 (file)
@@ -570,7 +570,7 @@ SAPI_API struct stat *sapi_get_stat()
 }
 
 
-SAPI_API char *sapi_getenv(char *name, int name_len)
+SAPI_API char *sapi_getenv(char *name, size_t name_len)
 {
        if (sapi_module.getenv) {
                SLS_FETCH();
index 2bd91421a9e86b76d13962ae07de9ef92d61eaf4..52f41864f0b5205a78c53e2104b20b709fccd5f0 100644 (file)
@@ -140,7 +140,7 @@ SAPI_API int sapi_register_default_post_reader(void (*default_post_reader)(SLS_D
 
 SAPI_API int sapi_flush(void);
 SAPI_API struct stat *sapi_get_stat(void);
-SAPI_API char *sapi_getenv(char *name, int name_len);
+SAPI_API char *sapi_getenv(char *name, size_t name_len);
 
 SAPI_API char *sapi_get_default_content_type(SLS_D);
 SAPI_API void sapi_get_default_content_type_header(sapi_header_struct *default_header SLS_DC);
@@ -159,7 +159,7 @@ struct _sapi_module_struct {
        int (*ub_write)(const char *str, unsigned int str_length);
        void (*flush)(void *server_context);
        struct stat *(*get_stat)(SLS_D);
-       char *(*getenv)(char *name, int name_len SLS_DC);
+       char *(*getenv)(char *name, size_t name_len SLS_DC);
 
        void (*sapi_error)(int type, const char *error_msg, ...);
 
index 8cbe1e3a4b1fcc97cd3e7ce4458714e1367356a6..682d3eedfe9331ad366ebe3e9c1bb5a6c8ac0f72 100644 (file)
@@ -315,7 +315,7 @@ static struct stat *php_apache_get_stat(SLS_D)
 }
 
 
-static char *php_apache_getenv(char *name, int name_len SLS_DC)
+static char *php_apache_getenv(char *name, size_t name_len SLS_DC)
 {
        return (char *) table_get(((request_rec *) SG(server_context))->subprocess_env, name);
 }