]> granicus.if.org Git - php/commitdiff
Merge branch 'PHP-5.6' into PHP-7.0
authorXinchen Hui <laruence@gmail.com>
Fri, 5 Feb 2016 11:51:33 +0000 (19:51 +0800)
committerXinchen Hui <laruence@gmail.com>
Fri, 5 Feb 2016 11:51:33 +0000 (19:51 +0800)
Conflicts:
ext/curl/interface.c

1  2 
ext/curl/interface.c
main/php_version.h

index bd611ce42f5d927db95371e06d9e11eb52cd09ff,d9aab7541c8638c12bfe0d490950c5eb158ccd4d..1cd22a8acf4a0360b06947bcd8591031e13a6db3
@@@ -2464,18 -2530,25 +2464,22 @@@ static int _php_curl_setopt(php_curl *c
                                return FAILURE;
                        }
  
 -                      for (zend_hash_internal_pointer_reset(ph);
 -                               zend_hash_get_current_data(ph, (void **) &current) == SUCCESS;
 -                               zend_hash_move_forward(ph)
 -                      ) {
 -                              SEPARATE_ZVAL(current);
 -                              convert_to_string_ex(current);
 -
 -                              slist = curl_slist_append(slist, Z_STRVAL_PP(current));
 +                      ZEND_HASH_FOREACH_VAL(ph, current) {
 +                              ZVAL_DEREF(current);
 +                              val = zval_get_string(current);
 +                              slist = curl_slist_append(slist, ZSTR_VAL(val));
 +                              zend_string_release(val);
                                if (!slist) {
 -                                      php_error_docref(NULL TSRMLS_CC, E_WARNING, "Could not build curl_slist");
 +                                      php_error_docref(NULL, E_WARNING, "Could not build curl_slist");
                                        return 1;
                                }
 -                      }
 +                      } ZEND_HASH_FOREACH_END();
  
-                       zend_hash_index_update_ptr(ch->to_free->slist, option, slist);
 -                      if (Z_REFCOUNT_P(ch->clone) <= 1) {
 -                              zend_hash_index_update(ch->to_free->slist, (ulong) option, &slist, sizeof(struct curl_slist *), NULL);
++                      if ((*ch->clone) == 1) {
++                              zend_hash_index_update_ptr(ch->to_free->slist, option, slist);
+                       } else {
 -                              zend_hash_next_index_insert(ch->to_free->slist, &slist, sizeof(struct curl_slist *), NULL);
++                              zend_hash_next_index_insert_ptr(ch->to_free->slist, slist);
+                       }
  
                        error = curl_easy_setopt(ch->cp, option, slist);
  
index 4096d9d50c5ccd8bf344df84f94fd59e57e00859,e306c0a5663321b850f0ec829d2348a334c0341e..d48ab241411eb5358927ef8de358f3dcae593689
@@@ -1,8 -1,8 +1,8 @@@
  /* automatically generated by configure */
  /* edit configure.in to change version number */
 -#define PHP_MAJOR_VERSION 5
 -#define PHP_MINOR_VERSION 6
 -#define PHP_RELEASE_VERSION 19
 +#define PHP_MAJOR_VERSION 7
 +#define PHP_MINOR_VERSION 0
- #define PHP_RELEASE_VERSION 4
++#define PHP_RELEASE_VERSION 0
  #define PHP_EXTRA_VERSION "-dev"
- #define PHP_VERSION "7.0.4-dev"
- #define PHP_VERSION_ID 70004
 -#define PHP_VERSION "5.6.19-dev"
 -#define PHP_VERSION_ID 50619
++#define PHP_VERSION "7.0.0-dev"
++#define PHP_VERSION_ID 70000