Permalink
Browse files

Merge branch 'PHP-5.5'

Conflicts:
	NEWS
  • Loading branch information...
2 parents 7a31692 + dc495bb commit c4fe37bd8c5e35d1957d43acecbcb3f010501e4a Andrey Hristov committed Jan 15, 2013
Showing with 1,305 additions and 131 deletions.
  1. +0 −1 NEWS
  2. +18 −0 Zend/zend_operators.c
  3. +2 −0 Zend/zend_operators.h
  4. +390 −67 ext/date/php_date.c
  5. +14 −0 ext/date/php_date.h
  6. +56 −0 ext/date/tests/date_period-immutable.phpt
  7. +25 −0 ext/date/tests/date_time_immutable-inherited.phpt
  8. +167 −0 ext/date/tests/date_time_immutable.phpt
  9. +10 −9 ext/dba/dba_flatfile.c
  10. +12 −5 ext/dba/dba_gdbm.c
  11. +0 −1 ext/dba/dba_inifile.c
  12. +6 −4 ext/dba/dba_qdbm.c
  13. +4 −0 ext/dba/tests/dba_db1.phpt
  14. +4 −0 ext/dba/tests/dba_db2.phpt
  15. +4 −0 ext/dba/tests/dba_db3.phpt
  16. +4 −0 ext/dba/tests/dba_db4_000.phpt
  17. +4 −0 ext/dba/tests/dba_dbm.phpt
  18. +4 −0 ext/dba/tests/dba_flatfile.phpt
  19. +2 −0 ext/dba/tests/dba_gdbm.phpt
  20. +10 −2 ext/dba/tests/dba_handler.inc
  21. +4 −0 ext/dba/tests/dba_inifile.phpt
  22. +4 −0 ext/dba/tests/dba_ndbm.phpt
  23. +2 −0 ext/dba/tests/dba_qdbm.phpt
  24. +4 −0 ext/dba/tests/dba_tcadb.phpt
  25. +90 −3 ext/mysqlnd/mysqlnd.c
  26. +1 −0 ext/mysqlnd/mysqlnd.h
  27. +4 −1 ext/mysqlnd/mysqlnd_auth.c
  28. +3 −0 ext/mysqlnd/mysqlnd_enum_n_def.h
  29. +2 −1 ext/mysqlnd/mysqlnd_libmysql_compat.h
  30. +5 −1 ext/mysqlnd/mysqlnd_structs.h
  31. +65 −1 ext/mysqlnd/mysqlnd_wireprotocol.c
  32. +1 −1 ext/mysqlnd/mysqlnd_wireprotocol.h
  33. +4 −2 ext/pdo_oci/oci_driver.c
  34. +1 −2 ext/pdo_oci/oci_statement.c
  35. +165 −0 ext/pdo_oci/tests/bug57702.phpt
  36. +6 −0 ext/pdo_sqlite/sqlite_statement.c
  37. +27 −0 ext/pdo_sqlite/tests/bug_63916-2.phpt
  38. +27 −0 ext/pdo_sqlite/tests/bug_63916.phpt
  39. +1 −1 ext/pgsql/pgsql.c
  40. +23 −0 ext/pgsql/tests/bug46408.phpt
  41. +5 −5 ext/spl/tests/SplFileObject_fputcsv.phpt
  42. +12 −0 ext/sqlite3/sqlite3.c
  43. +27 −0 ext/sqlite3/tests/bug63921-32bit.phpt
  44. +27 −0 ext/sqlite3/tests/bug63921-64bit.phpt
  45. +2 −6 ext/standard/file.c
  46. +1 −1 ext/standard/image.c
  47. +5 −5 ext/standard/tests/file/fputcsv.phpt
  48. +20 −0 ext/standard/tests/file/fputcsv_bug43225.phpt
  49. +16 −1 ext/standard/tests/image/getimagesize.phpt
  50. +6 −4 ext/standard/tests/image/image_type_to_mime_type.phpt
  51. BIN ext/standard/tests/image/test1bpix.bmp
  52. +5 −3 sapi/cli/php_cli_server.c
  53. +3 −3 sapi/cli/tests/php_cli_server_013.phpt
  54. +1 −1 sapi/cli/tests/php_cli_server_014.phpt
View
1 NEWS
@@ -1,6 +1,5 @@
PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
-<<<<<<< HEAD
?? ??? 201?, PHP 5.6.0
<<< NOTE: Insert NEWS from last stable release here prior to actual release! >>>
View
@@ -572,6 +572,24 @@ ZEND_API void convert_to_boolean(zval *op) /* {{{ */
}
/* }}} */
+ZEND_API void _convert_to_cstring(zval *op ZEND_FILE_LINE_DC) /* {{{ */
+{
+ double dval;
+ switch (Z_TYPE_P(op)) {
+ case IS_DOUBLE: {
+ TSRMLS_FETCH();
+ dval = Z_DVAL_P(op);
+ Z_STRLEN_P(op) = zend_spprintf(&Z_STRVAL_P(op), 0, "%.*H", (int) EG(precision), dval);
+ /* %H already handles removing trailing zeros from the fractional part, yay */
+ break;
+ }
+ default:
+ _convert_to_string(op ZEND_FILE_LINE_CC);
+ }
+ Z_TYPE_P(op) = IS_STRING;
+}
+/* }}} */
+
ZEND_API void _convert_to_string(zval *op ZEND_FILE_LINE_DC) /* {{{ */
{
long lval;
View
@@ -301,6 +301,7 @@ ZEND_API int increment_function(zval *op1);
ZEND_API int decrement_function(zval *op2);
ZEND_API void convert_scalar_to_number(zval *op TSRMLS_DC);
+ZEND_API void _convert_to_cstring(zval *op ZEND_FILE_LINE_DC);
ZEND_API void _convert_to_string(zval *op ZEND_FILE_LINE_DC);
ZEND_API void convert_to_long(zval *op);
ZEND_API void convert_to_double(zval *op);
@@ -314,6 +315,7 @@ ZEND_API void multi_convert_to_double_ex(int argc, ...);
ZEND_API void multi_convert_to_string_ex(int argc, ...);
ZEND_API int add_char_to_string(zval *result, const zval *op1, const zval *op2);
ZEND_API int add_string_to_string(zval *result, const zval *op1, const zval *op2);
+#define convert_to_cstring(op) if ((op)->type != IS_STRING) { _convert_to_cstring((op) ZEND_FILE_LINE_CC); }
#define convert_to_string(op) if ((op)->type != IS_STRING) { _convert_to_string((op) ZEND_FILE_LINE_CC); }
ZEND_API double zend_string_to_double(const char *number, zend_uint length);
Oops, something went wrong.

0 comments on commit c4fe37b

Please sign in to comment.