Skip to content

Commit 60f4fd0

Browse files
committed
Merge pull request #46 from BitOne/php7
Simplifies code and add summary analyzer
2 parents fecfcae + 6e8e70b commit 60f4fd0

File tree

3 files changed

+15
-14
lines changed

3 files changed

+15
-14
lines changed

.travis.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,12 @@ before_script:
1919
- phpenv config-rm xdebug.ini
2020

2121
script:
22-
- cd php$(echo $TRAVIS_PHP_VERSION | cut -b 1)/
22+
- cd extension/php$(echo $TRAVIS_PHP_VERSION | cut -b 1)/
23+
- php-config
2324
- phpize
24-
- configure
25+
- ./configure --disable-maintainer-zts
2526
- make
26-
- make test
27-
28-
after_script:
29-
- ./.travis.scripts/show-errors.sh
27+
- REPORT_EXIT_STATUS=1 make test
28+
- cd ../../analyzer
29+
- composer install
30+
- vendor/bin/phpspec run

extension/php5/meminfo.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ PHP_FUNCTION(meminfo_info_dump)
8484
// Switch the active frame to the current browsed one and rebuild the symbol table
8585
// to get it right
8686
EG(current_execute_data) = exec_frame;
87-
zend_rebuild_symbol_table();
87+
zend_rebuild_symbol_table(TSRMLS_C);
8888
symbol_table = EG(active_symbol_table);
8989

9090
// Once we have the symbol table, switch to the prev frame to get the right frame name
@@ -99,7 +99,7 @@ PHP_FUNCTION(meminfo_info_dump)
9999
}
100100
}
101101
EG(current_execute_data) = init_exec_frame;
102-
zend_rebuild_symbol_table();
102+
zend_rebuild_symbol_table(TSRMLS_C);
103103

104104
global_symbol_table = &EG(symbol_table);
105105

@@ -444,11 +444,11 @@ char * meminfo_info_dump_header(char * header, int header_len)
444444
size_t peak_memory_usage;
445445
size_t peak_memory_usage_real;
446446

447-
memory_usage = zend_memory_usage(0);
448-
memory_usage_real = zend_memory_usage(1);
447+
memory_usage = zend_memory_usage(0 TSRMLS_CC);
448+
memory_usage_real = zend_memory_usage(1 TSRMLS_CC);
449449

450-
peak_memory_usage = zend_memory_peak_usage(0);
451-
peak_memory_usage_real = zend_memory_peak_usage(1);
450+
peak_memory_usage = zend_memory_peak_usage(0 TSRMLS_CC);
451+
peak_memory_usage_real = zend_memory_peak_usage(1 TSRMLS_CC);
452452

453453
snprintf(
454454
header,

extension/php5/php_meminfo.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
#define MEMINFO_COPYRIGHT "Copyright (c) 2010-2017 by Benoit Jacquemont"
1010
#define MEMINFO_COPYRIGHT_SHORT "Copyright (c) 2011-2017"
1111

12+
extern zend_module_entry meminfo_entry;
13+
1214
PHP_FUNCTION(meminfo_info_dump);
1315

1416
const char * meminfo_get_classname(zend_object_handle handle);
@@ -25,6 +27,4 @@ void meminfo_build_frame_label(char * frame_label, int frame_label_len, zend_exe
2527
char * meminfo_escape_for_json(const char *s);
2628
char * meminfo_info_dump_header(char * header, int header_len);
2729

28-
extern zend_module_entry meminfo_entry;
29-
3030
#endif

0 commit comments

Comments
 (0)