[php-i18n-commits] cvs commit: Zend ChangeLog zend_compile.c zend_execute.c zend_extensions.h zend_globals.h zend_hash.c

Zurück zum Archiv-Index

Yasuo Ohgaki yohga****@users*****
2002年 8月 3日 (土) 09:38:00 JST


yohgaki     02/08/03 09:38:00

  Modified:    .        Tag: ORIG ChangeLog zend_compile.c zend_execute.c
                        zend_extensions.h zend_globals.h zend_hash.c
  Log:
  Recent cvs.php.net changes
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.2.2.6   +56 -1     Zend/ChangeLog
  
  Index: ChangeLog
  ===================================================================
  RCS file: /cvsroot/php-i18n/Zend/ChangeLog,v
  retrieving revision 1.2.2.5
  retrieving revision 1.2.2.6
  diff -u -r1.2.2.5 -r1.2.2.6
  --- ChangeLog	9 Jul 2002 09:02:00 -0000	1.2.2.5
  +++ ChangeLog	3 Aug 2002 00:37:59 -0000	1.2.2.6
  @@ -1,3 +1,58 @@
  +2002-08-02  Zeev Suraski  <zeev****@pb1*****>
  +
  +    * zend_execute.c: Fix bug #16558 (thanks, Ilya)
  +
  +2002-08-01  stas  <stas****@pb1*****>
  +
  +    * zend_execute.c
  +      zend_hash.c:
  +    fix bug #18140 - check return value of insert and make insert not
  +    wrap around
  +
  +2002-07-31  stas  <stas****@pb1*****>
  +
  +    * zend_extensions.h:
  +    CVS head is not binary compatible with latest release (4.2.2) - bump
  +    up the extension API number.
  +
  +2002-07-30  jason  <jason****@pb1*****>
  +
  +    * zend_execute.c
  +      zend_globals.h
  +      zend_compile.c:    This is done by counting the opcodes between the begining and end of the declaration.
  +
  +    Fixed certain situations where switching between tick counts could overflow the comparison
  +
  +2002-07-20  Thies Arntzen  <thies****@pb1*****>
  +
  +    * zend_execute.c:
  +    make sure that execute_data_ptr gets re-initialized after possible recursion
  +
  +2002-07-15  derick  <deric****@pb1*****>
  +
  +    * zend_operators.c: - Remove Andi's and Derick's crap
  +
  +2002-07-14  Sascha Schumann  <sas****@pb1*****>
  +
  +    * zend_operators.c: testing considered harmful.
  +
  +    compiles now again
  +
  +2002-07-14  derick  <deric****@pb1*****>
  +
  +    * zend_operators.c:
  +    - Now implement is as documented: considered TRUE, like any other non-zero
  +      (whether negative or positive) number! This means that FALSE++ = TRUE and
  +      TRUE++ is still TRUE. Same for FALSE-- = TRUE and TRUE-- = FALSE;
  +
  +    * zend_operators.c: - Added 'type juggling' for boolean values.
  +    - Added 'type juggling' for boolean values. The following conversions are
  +      done 
  +      $a = FALSE; $a++; /* $a is now bool(true); */
  +      $a = TRUE;  $a++; /* $a is now int(2); */
  +      $a = FALSE; $a--; /* $a is now int(-1); */
  +      $a = TRUE;  $a--; /* $a is now bool(false); */
  +
   2002-06-29  Andi Gutmans  <andi****@zend*****>
   
       * zend_language_parser.y: - Add missing semi-colon.
  @@ -140,7 +195,7 @@
   
   2002-05-13  Sterling Hughes  <sterl****@bumbl*****>
   
  -    * zend_qsort.c: add $Id: ChangeLog,v 1.48 2002/06/30 00:22:28 changelog Exp $ tag
  +    * zend_qsort.c: add $Id: ChangeLog,v 1.55 2002/08/03 00:17:51 changelog Exp $ tag
   
   2002-05-13  Derick Rethans  <d.ret****@jdime*****>
   
  
  
  
  1.2.2.3   +5 -1      Zend/zend_compile.c
  
  Index: zend_compile.c
  ===================================================================
  RCS file: /cvsroot/php-i18n/Zend/zend_compile.c,v
  retrieving revision 1.2.2.2
  retrieving revision 1.2.2.3
  diff -u -r1.2.2.2 -r1.2.2.3
  --- zend_compile.c	19 May 2002 11:10:23 -0000	1.2.2.2
  +++ zend_compile.c	3 Aug 2002 00:37:59 -0000	1.2.2.3
  @@ -2209,6 +2209,7 @@
   void zend_do_declare_begin(TSRMLS_D)
   {
   	zend_stack_push(&CG(declare_stack), &CG(declarables), sizeof(zend_declarables));
  +	CG(declarables).beginop = get_next_op_number(CG(active_op_array));
   }
   
   
  @@ -2251,7 +2252,10 @@
   	zend_declarables *declarables;
   
   	zend_stack_top(&CG(declare_stack), (void **) &declarables);
  -	CG(declarables) = *declarables;
  +	/* We should restore if there was more than (current - start) - (ticks?1:0) opcodes */
  +	if ((get_next_op_number(CG(active_op_array)) - CG(declarables).beginop) - ((CG(declarables).ticks.value.lval)?1:0)) {
  +		CG(declarables) = *declarables;
  +	}
   }
   
   
  
  
  
  1.2.2.2   +13 -2     Zend/zend_execute.c
  
  Index: zend_execute.c
  ===================================================================
  RCS file: /cvsroot/php-i18n/Zend/zend_execute.c,v
  retrieving revision 1.2.2.1
  retrieving revision 1.2.2.2
  diff -u -r1.2.2.1 -r1.2.2.2
  --- zend_execute.c	19 May 2002 11:10:23 -0000	1.2.2.1
  +++ zend_execute.c	3 Aug 2002 00:37:59 -0000	1.2.2.2
  @@ -757,7 +757,11 @@
   				zval *new_zval = &EG(uninitialized_zval);
   
   				new_zval->refcount++;
  -				zend_hash_next_index_insert(container->value.ht, &new_zval, sizeof(zval *), (void **) retval);
  +				if (zend_hash_next_index_insert(container->value.ht, &new_zval, sizeof(zval *), (void **) retval) == FAILURE) {
  +					zend_error(E_WARNING, "Cannot add element to the array as the nexxt element is already occupied");
  +					*retval = &EG(uninitialized_zval_ptr);
  +					new_zval->refcount--; 
  +				}
   			} else {
   				*retval = zend_fetch_dimension_address_inner(container->value.ht, op2, Ts, type TSRMLS_CC);
   			}
  @@ -1585,6 +1589,7 @@
   						ALLOC_ZVAL(EX(Ts)[EX(opline)->result.u.var].var.ptr);
   						INIT_ZVAL(*(EX(Ts)[EX(opline)->result.u.var].var.ptr));
   						((zend_internal_function *) EX(function_state).function)->handler(EX(opline)->extended_value, EX(Ts)[EX(opline)->result.u.var].var.ptr, EX(object).ptr, return_value_used TSRMLS_CC);
  +						EG(execute_data_ptr) = &execute_data;
   						if (EX(object).ptr) {
   							EX(object).ptr->refcount--;
   						}
  @@ -1625,6 +1630,7 @@
   						EG(active_op_array) = (zend_op_array *) EX(function_state).function;
   
   						zend_execute(EG(active_op_array) TSRMLS_CC);
  +						EG(execute_data_ptr) = &execute_data;
   
   						if (return_value_used && !EX(Ts)[EX(opline)->result.u.var].var.ptr) {
   							ALLOC_ZVAL(EX(Ts)[EX(opline)->result.u.var].var.ptr);
  @@ -1672,6 +1678,10 @@
   						
   						retval_ptr_ptr = get_zval_ptr_ptr(&EX(opline)->op1, EX(Ts), BP_VAR_W);
   
  +						if (!retval_ptr_ptr) {
  +							zend_error(E_ERROR, "Cannot return overloaded elements or string offsets by reference");
  +						}
  +
   						SEPARATE_ZVAL_TO_MAKE_IS_REF(retval_ptr_ptr);
   						(*retval_ptr_ptr)->refcount++;
   						
  @@ -2128,6 +2138,7 @@
   						EX(Ts)[EX(opline)->result.u.var].var.ptr = NULL;
   
   						zend_execute(new_op_array TSRMLS_CC);
  +						EG(execute_data_ptr) = &execute_data;
   						
   						if (!return_value_used) {
   							if (EX(Ts)[EX(opline)->result.u.var].var.ptr) {
  @@ -2423,7 +2434,7 @@
   				do_bind_function_or_class(EX(opline), EG(function_table), EG(class_table), 0);
   				NEXT_OPCODE();
   			case ZEND_TICKS:
  -				if (++EG(ticks_count)==EX(opline)->op1.u.constant.value.lval) {
  +				if (++EG(ticks_count)>=EX(opline)->op1.u.constant.value.lval) {
   					EG(ticks_count)=0;
   					if (zend_ticks_function) {
   						zend_ticks_function(EX(opline)->op1.u.constant.value.lval);
  
  
  
  1.2.2.2   +1 -1      Zend/zend_extensions.h
  
  Index: zend_extensions.h
  ===================================================================
  RCS file: /cvsroot/php-i18n/Zend/zend_extensions.h,v
  retrieving revision 1.2.2.1
  retrieving revision 1.2.2.2
  diff -u -r1.2.2.1 -r1.2.2.2
  --- zend_extensions.h	2 May 2002 15:46:36 -0000	1.2.2.1
  +++ zend_extensions.h	3 Aug 2002 00:38:00 -0000	1.2.2.2
  @@ -23,7 +23,7 @@
   
   #include "zend_compile.h"
   
  -#define ZEND_EXTENSION_API_NO	20020429
  +#define ZEND_EXTENSION_API_NO	20020731
   
   typedef struct _zend_extension_version_info {
   	int zend_extension_api_no;
  
  
  
  1.2.2.4   +1 -0      Zend/zend_globals.h
  
  Index: zend_globals.h
  ===================================================================
  RCS file: /cvsroot/php-i18n/Zend/zend_globals.h,v
  retrieving revision 1.2.2.3
  retrieving revision 1.2.2.4
  diff -u -r1.2.2.3 -r1.2.2.4
  --- zend_globals.h	9 Jul 2002 09:02:00 -0000	1.2.2.3
  +++ zend_globals.h	3 Aug 2002 00:38:00 -0000	1.2.2.4
  @@ -61,6 +61,7 @@
   
   typedef struct _zend_declarables {
   	zval ticks;
  +	zend_uint beginop;
   } zend_declarables;
   
   
  
  
  
  1.2.2.1   +2 -2      Zend/zend_hash.c
  
  Index: zend_hash.c
  ===================================================================
  RCS file: /cvsroot/php-i18n/Zend/zend_hash.c,v
  retrieving revision 1.2
  retrieving revision 1.2.2.1
  diff -u -r1.2 -r1.2.2.1
  --- zend_hash.c	29 Apr 2002 02:25:13 -0000	1.2
  +++ zend_hash.c	3 Aug 2002 00:38:00 -0000	1.2.2.1
  @@ -393,7 +393,7 @@
   			}
   			UPDATE_DATA(ht, p, pData, nDataSize);
   			HANDLE_UNBLOCK_INTERRUPTIONS();
  -			if (h >= ht->nNextFreeElement) {
  +			if ((long)h >= (long)ht->nNextFreeElement) { /* comparing signed to avoid wraparounds on -1 */
   				ht->nNextFreeElement = h + 1;
   			}
   			if (pDest) {
  @@ -421,7 +421,7 @@
   	CONNECT_TO_GLOBAL_DLLIST(p, ht);
   	HANDLE_UNBLOCK_INTERRUPTIONS();
   
  -	if (h >= ht->nNextFreeElement) {
  +	if ((long)h >= (long)ht->nNextFreeElement) { /* comparing signed to avoid wraparounds on -1 */
   		ht->nNextFreeElement = h + 1;
   	}
   	ht->nNumOfElements++;
  
  
  



php-i18n-commits メーリングリストの案内
Zurück zum Archiv-Index