Commit:    ca660c2f778da0bc2e24295eba674351d407a854
Author:    Nikita Popov <ni...@php.net>         Mon, 17 Jun 2013 18:27:22 +0200
Parents:   7713b8c2ac2d8fbacaf897ff0c0a202a7b7abf49
Branches:  master

Link:       
http://git.php.net/?p=php-src.git;a=commitdiff;h=ca660c2f778da0bc2e24295eba674351d407a854

Log:
Update NEWS, UPGRADING and UPGRADING.INTERNALS

Changed paths:
  M  NEWS
  M  UPGRADING
  M  UPGRADING.INTERNALS


Diff:
diff --git a/NEWS b/NEWS
index 7516a6a..076a0c1 100644
--- a/NEWS
+++ b/NEWS
@@ -4,6 +4,8 @@ PHP                                                             
           NEWS
 
 - Core:
   . Improved IS_VAR operands fetching. (Laruence, Dmitry)
+  . Implemented internal operator overloading
+    (RFC: https://wiki.php.net/rfc/operator_overloading_gmp). (Nikita)
 
 - OPcache:
   . Added an optimization pass to convert FCALL_BY_NAME into DO_FCALL.
@@ -12,9 +14,14 @@ PHP                                                          
              NEWS
     cache_slots) in op_array->literals table. (Laruence, Dmitry)
   . Added script level constant replacement optimization pass. (Dmitry)
 
-- PDO_pgsql
+- PDO_pgsql:
   . Fixed Bug #42614 (PDO_pgsql: add pg_get_notify support). (Matteo)
   . Fixed Bug #63657 (pgsqlCopyFromFile, pgsqlCopyToArray use Postgres < 7.3
     syntax). (Matteo)
 
+- GMP:
+  . Moved GMP to use object as the underlying structure and implemented various
+    improvements based on this.
+    (RFC: https://wiki.php.net/rfc/operator_overloading_gmp). (Nikita)
+
 <<< NOTE: Insert NEWS from last stable release here prior to actual release! 
>>>
diff --git a/UPGRADING b/UPGRADING
index 09218cc..e78e46d 100755
--- a/UPGRADING
+++ b/UPGRADING
@@ -63,6 +63,11 @@ PHP X.Y UPGRADE NOTES
 8. Other Changes to Extensions
 ========================================
 
+- GMP:
+  The GMP extension now uses objects as the underlying data structure, rather
+  than resources. GMP instances now support dumping, serialization, cloning,
+  casts to primitive types and have overloaded operators.
+  (RFC: https://wiki.php.net/rfc/operator_overloading_gmp)
 
 ========================================
 9. New Global Constants
diff --git a/UPGRADING.INTERNALS b/UPGRADING.INTERNALS
index e9252b7..cfc19d5 100644
--- a/UPGRADING.INTERNALS
+++ b/UPGRADING.INTERNALS
@@ -3,7 +3,7 @@ $Id$
 UPGRADE NOTES - PHP X.Y
 
 1. Internal API changes
-  a.
+  a. Addition of do_operation and compare object handlers
 
 2. Build system changes
   a. Unix build system changes
@@ -14,6 +14,35 @@ UPGRADE NOTES - PHP X.Y
 1. Internal API changes
 ========================
 
+  a. Addition of do_operation and compare object handlers
+
+  Two new object handlers have been added:
+
+    do_operation:
+    typedef int (*zend_object_do_operation_t)(
+        zend_uchar opcode, zval *result, zval *op1, zval *op2 TSRMLS_DC
+    );
+
+    compare:
+    typedef int (*zend_object_compare_zvals_t)(
+        zval *result, zval *op1, zval *op2 TSRMLS_DC
+    );
+
+  The first handler is used to overload arithmetic operations. The first
+  argument specifies the opcode of the operator, result is the target zval,
+  op1 the first operand and op2 the second operand. For unary operations
+  op2 is NULL. If the handler returns FAILURE PHP falls back to the default
+  behavior for the operation.
+
+  The second handler is used to perform comparison operations with
+  non-objects. The value written into result must be an IS_LONG with value
+  -1 (smaller), 0 (equal) or 1 (greater). The return value is a SUCCESS/FAILURE
+  return code. The difference between this handler and compare_objects is
+  that it will be triggered for comparisons with non-objects and objects of
+  different types. It takes precedence over compare_objects.
+
+  Further docs in the RFC: https://wiki.php.net/rfc/operator_overloading_gmp
+
 ========================
 2. Build system changes
 ========================


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to