Skip to content

Commit 6ea9a54

Browse files
committed
Use PHPC_READ_PROPERTY in FANNConnection
1 parent c332710 commit 6ea9a54

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

fann.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1866,6 +1866,7 @@ PHP_FUNCTION(fann_set_weight_array)
18661866
struct fann *ann;
18671867
struct fann_connection *connections;
18681868
unsigned num_connections, i = 0;
1869+
PHPC_READ_PROPERTY_RV_DECLARE;
18691870

18701871
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ra", &z_ann, &array) == FAILURE) {
18711872
return;

php_fann.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,8 +238,8 @@ PHP_FANN_API extern zend_class_entry *php_fann_FANNConnection_class;
238238
zend_declare_property_##__type(php_fann_FANNConnection_class, PHP_FANN_CONN_PROP_NAME(__name), \
239239
0, ZEND_ACC_PUBLIC TSRMLS_CC)
240240
#define PHP_FANN_CONN_PROP_READ(__obj, __name) \
241-
zend_read_property(php_fann_FANNConnection_class, (__obj), \
242-
PHP_FANN_CONN_PROP_NAME(__name), 0 TSRMLS_CC)
241+
PHPC_READ_PROPERTY(php_fann_FANNConnection_class, (__obj), \
242+
__name, sizeof(__name)-1, 0)
243243

244244
#endif /* PHP_FANN_H */
245245

0 commit comments

Comments
 (0)