Skip to content

Commit c5afcc1

Browse files
committed
1.1.2
1 parent 86cd5cf commit c5afcc1

File tree

6 files changed

+26
-8
lines changed

6 files changed

+26
-8
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@ before_script:
2323

2424
script:
2525
- composer test
26-
- composer memtest
26+
# - composer memtest

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22
All notable changes to this project will be documented in this file.
33
This project adheres to [Semantic Versioning](http://semver.org/).
44

5+
## [1.1.2] - 2016-08-05
6+
### Fixed
7+
- Many, many memory leaks.
8+
- Added valgrind to travis.yml
9+
- Small performance improvements
10+
- JSON dependency now handled correctly (thanks @NikiC)
11+
512
## [1.1.1] - 2016-08-04
613
### Fixed
714
- Multiple memory leaks where objects were not free'd correctly. #30

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@
1313
},
1414
"scripts": {
1515
"test": "vendor/bin/phpunit -c ./vendor/php-ds/tests/phpunit.xml",
16-
"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"
16+
"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"
1717
}
1818
}

package.xml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@
1616
<email>[email protected]</email>
1717
<active>yes</active>
1818
</lead>
19-
<date>2016-08-04</date>
20-
<time>05:35:40</time>
19+
<date>2016-08-05</date>
20+
<time>11:02:12</time>
2121
<version>
22-
<release>1.1.1</release>
22+
<release>1.1.2</release>
2323
<api>1.1.0</api>
2424
</version>
2525
<stability>
@@ -28,7 +28,9 @@
2828
</stability>
2929
<license uri="https://opensource.org/licenses/MIT">MIT License</license>
3030
<notes>
31-
Fix memory leaks where objects were not free'd correctly
31+
Fixed many memory leaks
32+
Fixed json dependency
33+
Minor performance improvements
3234
</notes>
3335
<contents>
3436
<dir name="/">

php_ds.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ extern zend_module_entry ds_module_entry;
2020
#define phpext_ds_ptr &ds_module_entry
2121

2222
/* Replace with version number for your extension */
23-
#define PHP_DS_VERSION "1.1.1"
23+
#define PHP_DS_VERSION "1.1.2"
2424

2525
#ifdef PHP_WIN32
2626
# define PHP_API __declspec(dllexport)

src/common.c

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,18 @@ void ds_normalize_slice_args(
9999

100100
void smart_str_appendz(smart_str *buffer, zval *value)
101101
{
102+
switch (Z_TYPE_P(value)) {
103+
case IS_STRING:
104+
smart_str_append(buffer, Z_STR_P(value));
105+
return;
106+
case IS_LONG:
107+
smart_str_append_long(buffer, Z_LVAL_P(value));
108+
return;
109+
}
110+
102111
zend_string *str = zval_get_string(value);
103112
smart_str_append(buffer, str);
104-
// zend_string_free(str);
113+
zend_string_free(str);
105114
}
106115

107116
zend_string *ds_join_zval_buffer(

0 commit comments

Comments
 (0)