[php-i18n-commits] cvs commit: php4/ext/mbstring post.c

Back to archive index

Moriyoshi Koizumi moriy****@users*****
2002年 10月 7日 (月) 07:03:14 JST


moriyoshi    02/10/07 07:03:14

  Modified:    ext/mbstring post.c
  Log:
  use SAPI_TREAT_DATA_FUNC for consistency
  
  Revision  Changes    Path
  1.3       +4 -8      php4/ext/mbstring/post.c
  
  Index: post.c
  ===================================================================
  RCS file: /cvsroot/php-i18n/php4/ext/mbstring/post.c,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- post.c	30 Sep 2002 18:30:29 -0000	1.2
  +++ post.c	6 Oct 2002 22:03:14 -0000	1.3
  @@ -48,14 +48,11 @@
   }
   #endif
   
  -#define PHP_MB_IS_VALID_ENCODING(enc) ((enc)!=NULL)
  -
  -
   /* {{{ count_separators(const char *, const char *, enum mbfl_no_language, php_mb_enc *) */ 
   static int count_separators(const char *res, const char *sep, php_mb_enc *enc)
   {
   	int retval = 1;
  -	int nbytes;
  +	size_t nbytes;
   	const char *s1, *s2;
   
   	/* the separator may contain multiple chars. */
  @@ -71,7 +68,7 @@
   				} 
   			}
   		}
  -		while ( --nbytes >= 0 && *(++s1) != '\0' );
  +		while ( nbytes-- > 0 && *(++s1) != '\0' );
   	}
   	return retval;
   }
  @@ -81,7 +78,7 @@
   int php_mbstr_encoding_handler_ex(zval *arg, char *res, const char *separator, int force_register_globals TSRMLS_DC) 
   {
   	char *var, *val;
  -	char *strtok_buf = NULL;
  +	php_mb_strtok_t strtok_buf;
   	zval *array_ptr = (zval *) arg;
   	int n, num, var_len, val_len;
   	int prev_rg_state;
  @@ -140,7 +137,6 @@
   
   	/* split and decode the query */
   	n = 0;
  -	strtok_buf = NULL;
   	var = php_mb_strtok_r_ex(res, separator, &strtok_buf, from_encoding);
   	while (var)  {
   		val = strchr(var, '=');
  @@ -252,7 +248,7 @@
   /* }}} */
   
   /* http input processing */
  -void mbstr_treat_data(int arg, char *str, zval* destArray TSRMLS_DC)
  +SAPI_API SAPI_TREAT_DATA_FUNC(mbstr_treat_data)
   {
   	char *res = NULL, *separator=NULL;
   	const char *c_var;
  
  
  



php-i18n-commits メーリングリストの案内
Back to archive index