Skip to content

Commit

Permalink
1.1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
rtheunissen committed Aug 4, 2016
1 parent 86cd5cf commit c5afcc1
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ before_script:

script:
- composer test
- composer memtest
# - composer memtest
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).

## [1.1.2] - 2016-08-05
### Fixed
- Many, many memory leaks.
- Added valgrind to travis.yml
- Small performance improvements
- JSON dependency now handled correctly (thanks @NikiC)

## [1.1.1] - 2016-08-04
### Fixed
- Multiple memory leaks where objects were not free'd correctly. #30
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@
},
"scripts": {
"test": "vendor/bin/phpunit -c ./vendor/php-ds/tests/phpunit.xml",
"memtest": "USE_ZEND_ALLOC=0 ZEND_DONT_UNLOAD_MODULES=1 valgrind --error-exitcode=1 --tool=memcheck --trace-children=yes --vex-iropt-precise-memory-exns=yes --track-origins=yes php vendor/bin/phpunit -c ./vendor/php-ds/tests/phpunit.xml"
"memtest": "USE_ZEND_ALLOC=0 ZEND_DONT_UNLOAD_MODULES=1 valgrind --error-exitcode=1 --vex-iropt-precise-memory-exns=yes --track-origins=yes --leak-check=full php vendor/bin/phpunit -c ./vendor/php-ds/tests/phpunit.xml"
}
}
10 changes: 6 additions & 4 deletions package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
<email>krakjoe@php.net</email>
<active>yes</active>
</lead>
<date>2016-08-04</date>
<time>05:35:40</time>
<date>2016-08-05</date>
<time>11:02:12</time>
<version>
<release>1.1.1</release>
<release>1.1.2</release>
<api>1.1.0</api>
</version>
<stability>
Expand All @@ -28,7 +28,9 @@
</stability>
<license uri="https://opensource.org/licenses/MIT">MIT License</license>
<notes>
Fix memory leaks where objects were not free'd correctly
Fixed many memory leaks
Fixed json dependency
Minor performance improvements
</notes>
<contents>
<dir name="/">
Expand Down
2 changes: 1 addition & 1 deletion php_ds.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ extern zend_module_entry ds_module_entry;
#define phpext_ds_ptr &ds_module_entry

/* Replace with version number for your extension */
#define PHP_DS_VERSION "1.1.1"
#define PHP_DS_VERSION "1.1.2"

#ifdef PHP_WIN32
# define PHP_API __declspec(dllexport)
Expand Down
11 changes: 10 additions & 1 deletion src/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,18 @@ void ds_normalize_slice_args(

void smart_str_appendz(smart_str *buffer, zval *value)
{
switch (Z_TYPE_P(value)) {
case IS_STRING:
smart_str_append(buffer, Z_STR_P(value));
return;
case IS_LONG:
smart_str_append_long(buffer, Z_LVAL_P(value));
return;
}

zend_string *str = zval_get_string(value);
smart_str_append(buffer, str);
// zend_string_free(str);
zend_string_free(str);
}

zend_string *ds_join_zval_buffer(
Expand Down

0 comments on commit c5afcc1

Please sign in to comment.