Skip to content
This repository was archived by the owner on Mar 29, 2024. It is now read-only.

Commit 5102961

Browse files
committed
Rename internal field and use internal fields in callback ctor
1 parent 28addc8 commit 5102961

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

src/php_v8_callbacks.cc

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,14 @@
3636
namespace phpv8 {
3737

3838
Callback::Callback(zend_fcall_info fci, zend_fcall_info_cache fci_cache) : fci_(fci), fci_cache_(fci_cache) {
39-
if (fci.size) {
40-
Z_ADDREF(fci.function_name);
39+
if (fci_.size) {
40+
Z_ADDREF(fci_.function_name);
4141

42-
if (fci.object) {
43-
ZVAL_OBJ(&object, fci.object);
44-
Z_ADDREF(object);
42+
if (fci_.object) {
43+
ZVAL_OBJ(&object_, fci_.object);
44+
Z_ADDREF(object_);
4545
} else {
46-
ZVAL_UNDEF(&object);
46+
ZVAL_UNDEF(&object_);
4747
}
4848
}
4949
}
@@ -52,8 +52,8 @@ namespace phpv8 {
5252
if (fci_.size) {
5353
zval_ptr_dtor(&fci_.function_name);
5454

55-
if (!Z_ISUNDEF(object)) {
56-
zval_ptr_dtor(&object);
55+
if (!Z_ISUNDEF(object_)) {
56+
zval_ptr_dtor(&object_);
5757
}
5858
}
5959
}
@@ -64,7 +64,7 @@ namespace phpv8 {
6464
if (fci_.size) {
6565
size += 1;
6666

67-
if (!Z_ISUNDEF(object)) {
67+
if (!Z_ISUNDEF(object_)) {
6868
size += 1;
6969
}
7070
}
@@ -76,8 +76,8 @@ namespace phpv8 {
7676
if (fci_.size) {
7777
ZVAL_COPY_VALUE(zv++, &fci_.function_name);
7878

79-
if (!Z_ISUNDEF(object)) {
80-
ZVAL_COPY_VALUE(zv++, &object);
79+
if (!Z_ISUNDEF(object_)) {
80+
ZVAL_COPY_VALUE(zv++, &object_);
8181
}
8282
}
8383
}

src/php_v8_callbacks.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ namespace phpv8 {
8585
}
8686

8787
private:
88-
zval object;
88+
zval object_;
8989
zend_fcall_info fci_;
9090
zend_fcall_info_cache fci_cache_;
9191
};

0 commit comments

Comments
 (0)