cvs: ZendEngine2 / zend_compile.h zend_opcode.c

[email protected] ("Matt Wilmas")
Newsgroups php.zend-engine.cvs
Message-ID <cvsmattwil1220033535@cvsserver>
mattwil		Fri Aug 29 18:12:15 2008 UTC

  Modified files:              
    /ZendEngine2	zend_compile.h zend_opcode.c 
  Log:
  - Updated unary_op_type typedef with TSRMLS_DC
  - Added binary_op_type typedef
  - Added missing ZEND_BOOL_XOR to get_binary_op()
  
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_compile.h?r1=1.388&r2=1.389&diff_format=u
Index: ZendEngine2/zend_compile.h
diff -u ZendEngine2/zend_compile.h:1.388 ZendEngine2/zend_compile.h:1.389
--- ZendEngine2/zend_compile.h:1.388	Tue Aug 12 17:15:59 2008
+++ ZendEngine2/zend_compile.h	Fri Aug 29 18:12:15 2008
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: zend_compile.h,v 1.388 2008/08/12 17:15:59 felipe Exp $ */
+/* $Id: zend_compile.h,v 1.389 2008/08/29 18:12:15 mattwil Exp $ */
 
 #ifndef ZEND_COMPILE_H
 #define ZEND_COMPILE_H
@@ -394,9 +394,10 @@
 void zend_do_fetch_static_member(znode *result, znode *class_znode TSRMLS_DC);
 void zend_do_print(znode *result, const znode *arg TSRMLS_DC);
 void zend_do_echo(const znode *arg, zend_bool inline_html TSRMLS_DC);
-typedef int (*unary_op_type)(zval *, zval *);
+typedef int (*unary_op_type)(zval *, zval * TSRMLS_DC);
+typedef int (*binary_op_type)(zval *, zval *, zval * TSRMLS_DC);
 ZEND_API unary_op_type get_unary_op(int opcode);
-ZEND_API void *get_binary_op(int opcode);
+ZEND_API binary_op_type get_binary_op(int opcode);
 
 void zend_do_while_cond(const znode *expr, znode *close_bracket_token TSRMLS_DC);
 void zend_do_while_end(const znode *while_token, const znode *close_bracket_token TSRMLS_DC);
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_opcode.c?r1=1.134&r2=1.135&diff_format=u
Index: ZendEngine2/zend_opcode.c
diff -u ZendEngine2/zend_opcode.c:1.134 ZendEngine2/zend_opcode.c:1.135
--- ZendEngine2/zend_opcode.c:1.134	Wed May  7 12:04:58 2008
+++ ZendEngine2/zend_opcode.c	Fri Aug 29 18:12:15 2008
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: zend_opcode.c,v 1.134 2008/05/07 12:04:58 dmitry Exp $ */
+/* $Id: zend_opcode.c,v 1.135 2008/08/29 18:12:15 mattwil Exp $ */
 
 #include <stdio.h>
 
@@ -495,73 +495,76 @@
 }
 /* }}} */
 
-ZEND_API void *get_binary_op(int opcode) /* {{{ */
+ZEND_API binary_op_type get_binary_op(int opcode) /* {{{ */
 {
 	switch (opcode) {
 		case ZEND_ADD:
 		case ZEND_ASSIGN_ADD:
-			return (void *) add_function;
+			return (binary_op_type) add_function;
 			break;
 		case ZEND_SUB:
 		case ZEND_ASSIGN_SUB:
-			return (void *) sub_function;
+			return (binary_op_type) sub_function;
 			break;
 		case ZEND_MUL:
 		case ZEND_ASSIGN_MUL:
-			return (void *) mul_function;
+			return (binary_op_type) mul_function;
 			break;
 		case ZEND_DIV:
 		case ZEND_ASSIGN_DIV:
-			return (void *) div_function;
+			return (binary_op_type) div_function;
 			break;
 		case ZEND_MOD:
 		case ZEND_ASSIGN_MOD:
-			return (void *) mod_function;
+			return (binary_op_type) mod_function;
 			break;
 		case ZEND_SL:
 		case ZEND_ASSIGN_SL:
-			return (void *) shift_left_function;
+			return (binary_op_type) shift_left_function;
 			break;
 		case ZEND_SR:
 		case ZEND_ASSIGN_SR:
-			return (void *) shift_right_function;
+			return (binary_op_type) shift_right_function;
 			break;
 		case ZEND_CONCAT:
 		case ZEND_ASSIGN_CONCAT:
-			return (void *) concat_function;
+			return (binary_op_type) concat_function;
 			break;
 		case ZEND_IS_IDENTICAL:
-			return (void *) is_identical_function;
+			return (binary_op_type) is_identical_function;
 			break;
 		case ZEND_IS_NOT_IDENTICAL:
-			return (void *) is_not_identical_function;
+			return (binary_op_type) is_not_identical_function;
 			break;
 		case ZEND_IS_EQUAL:
-			return (void *) is_equal_function;
+			return (binary_op_type) is_equal_function;
 			break;
 		case ZEND_IS_NOT_EQUAL:
-			return (void *) is_not_equal_function;
+			return (binary_op_type) is_not_equal_function;
 			break;
 		case ZEND_IS_SMALLER:
-			return (void *) is_smaller_function;
+			return (binary_op_type) is_smaller_function;
 			break;
 		case ZEND_IS_SMALLER_OR_EQUAL:
-			return (void *) is_smaller_or_equal_function;
+			return (binary_op_type) is_smaller_or_equal_function;
 			break;
 		case ZEND_BW_OR:
 		case ZEND_ASSIGN_BW_OR:
-			return (void *) bitwise_or_function;
+			return (binary_op_type) bitwise_or_function;
 			break;
 		case ZEND_BW_AND:
 		case ZEND_ASSIGN_BW_AND:
-			return (void *) bitwise_and_function;
+			return (binary_op_type) bitwise_and_function;
 			break;
 		case ZEND_BW_XOR:
 		case ZEND_ASSIGN_BW_XOR:
-			return (void *) bitwise_xor_function;
+			return (binary_op_type) bitwise_xor_function;
+			break;
+		case ZEND_BOOL_XOR:
+			return (binary_op_type) boolean_xor_function;
 			break;
 		default:
-			return (void *) NULL;
+			return (binary_op_type) NULL;
 			break;
 	}
 }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.