3 Commits

Author SHA1 Message Date
Simon Bazley
5a86d23ae6 Set myself as lead, so I can upload release 2020-01-13 18:28:31 +00:00
Simon Bazley
8a390dd154 Updated release notes 2020-01-13 18:23:05 +00:00
Simon Bazley
cb5d842bc0 Bumped version to 0.4.0 2020-01-13 18:11:10 +00:00
3 changed files with 12 additions and 27 deletions

View File

@@ -1,6 +1,6 @@
/*
+----------------------------------------------------------------------+
| PHP Version 5, 7 and 8 |
| PHP Version 5 and 7 |
+----------------------------------------------------------------------+
| Copyright (c) 1997-2004 The PHP Group |
+----------------------------------------------------------------------+
@@ -318,7 +318,7 @@ PHP_FUNCTION(expect_expectl)
if (ZEND_NUM_ARGS() < 2 || ZEND_NUM_ARGS() > 3) { WRONG_PARAM_COUNT; }
if (zend_parse_parameters (ZEND_NUM_ARGS() TSRMLS_CC, "ra|z/", &z_stream, &z_cases, &z_match) == FAILURE) {
if (zend_parse_parameters (ZEND_NUM_ARGS() TSRMLS_CC, "ra|z", &z_stream, &z_cases, &z_match) == FAILURE) {
return;
}
@@ -452,15 +452,11 @@ PHP_FUNCTION(expect_expectl)
if (z_match && exp_match && exp_match_len > 0) {
char *tmp = (char *)emalloc (sizeof(char) * (exp_match_len + 1));
strlcpy (tmp, exp_match, exp_match_len + 1);
#if PHP_MAJOR_VERSION >= 7
z_match = zend_try_array_init(z_match);
if (!z_match) {
return;
}
add_index_string(z_match, 0, tmp);
#else
zval_dtor (z_match);
array_init(z_match);
#if PHP_MAJOR_VERSION >= 7
add_index_string(z_match, 0, tmp);
#else
add_index_string(z_match, 0, tmp, 1);
#endif
/* Get case that was matched */

View File

@@ -9,9 +9,9 @@ http://pear.php.net/dtd/package-2.0.xsd">
<description>This extension allows to interact with processes through PTY, using expect library.
</description>
<lead>
<name>Michael Spector</name>
<user>michael</user>
<email>michael@php.net</email>
<name>Simon Bazley</name>
<user>sibaz</user>
<email>sibaz@sibaz.com</email>
<active>yes</active>
</lead>
<date>2020-01-13</date>
@@ -26,7 +26,8 @@ http://pear.php.net/dtd/package-2.0.xsd">
</stability>
<license uri="http://www.php.net/license">PHP License</license>
<notes>
Added LICENSE. Fixed RPM build for 64bit.
Added code to support API for PHP 7.x
Updated build scripts, to support 64bit centos
</notes>
<contents>
<dir name="/">
@@ -51,7 +52,7 @@ http://pear.php.net/dtd/package-2.0.xsd">
<required>
<php>
<min>4.0.0</min>
<max>8.99.99</max>
<max>7.99.99</max>
</php>
<pearinstaller>
<min>1.4.0b1</min>

View File

@@ -1,6 +1,6 @@
/*
+----------------------------------------------------------------------+
| PHP Version 5, 7 and 8 |
| PHP Version 5 and 7 |
+----------------------------------------------------------------------+
| Copyright (c) 1997-2004 The PHP Group |
+----------------------------------------------------------------------+
@@ -68,18 +68,6 @@ ZEND_END_MODULE_GLOBALS(expect)
#include "TSRM.h"
#endif /* ZTS */
#if ZEND_MODULE_API_NO >= 20190128
#ifndef TSRMLS_CC
#define TSRMLS_CC
#endif
#ifndef TSRMLS_DC
#define TSRMLS_DC
#endif
#ifndef TSRMLS_FETCH
#define TSRMLS_FETCH()
#endif
#endif
#endif /* PHP_EXPECT_H */
/*