Commit f89d8112 authored by Frederick Zhang's avatar Frederick Zhang

naming convention

parent 499a23ca
Pipeline #347 passed with stage
in 1 minute and 8 seconds
......@@ -229,7 +229,7 @@ std::string bdict::encode() const {
std::string str_index(ZSTR_VAL(_str_index), ZSTR_LEN(_str_index));
result += std::to_string(str_index.length()) + ":" + str_index
+ zend_container::fetch_bnode_object_data(Z_OBJ_P(value))->encode();
+ zend_container::bnode_fetch_object_data(Z_OBJ_P(value))->encode();
}
return result + "e";
}
......@@ -245,7 +245,7 @@ zval * bdict::to_array(const bool include_meta) const {
zend_ulong num_index;
zend_hash_get_current_key(_data, &str_index, &num_index);
zval *value = zend_hash_get_current_data(_data);
zval *subarray = zend_container::fetch_bnode_object_data(Z_OBJ_P(value))->to_array(include_meta);
zval *subarray = zend_container::bnode_fetch_object_data(Z_OBJ_P(value))->to_array(include_meta);
zend_hash_add(Z_ARR_P(zv), str_index, subarray);
}
......@@ -281,7 +281,7 @@ zval * bdict::search(const std::string &needle, const long &mode, const std::str
add_next_index_stringl(zv, current_path.c_str(), current_path.length());
}
zval *next_result = zend_container::fetch_bnode_object_data(Z_OBJ_P(value))->search(needle, mode, current_path);
zval *next_result = zend_container::bnode_fetch_object_data(Z_OBJ_P(value))->search(needle, mode, current_path);
zend_hash_append_strings(Z_ARRVAL_P(zv), Z_ARRVAL_P(next_result));
}
......
......@@ -258,7 +258,7 @@ std::string blist::encode() const {
zend_hash_has_more_elements(_data) == SUCCESS;
zend_hash_move_forward(_data)) {
zval *value = zend_hash_get_current_data(_data);
result += zend_container::fetch_bnode_object_data(Z_OBJ_P(value))->encode();
result += zend_container::bnode_fetch_object_data(Z_OBJ_P(value))->encode();
}
return result + "e";
}
......@@ -271,7 +271,7 @@ zval * blist::to_array(const bool include_meta) const {
zend_hash_has_more_elements(_data) == SUCCESS;
zend_hash_move_forward(_data)) {
zval *value = zend_hash_get_current_data(_data);
zval *subarray = zend_container::fetch_bnode_object_data(Z_OBJ_P(value))->to_array(include_meta);
zval *subarray = zend_container::bnode_fetch_object_data(Z_OBJ_P(value))->to_array(include_meta);
add_next_index_zval(zv, subarray);
}
......@@ -302,7 +302,7 @@ zval * blist::search(const std::string &needle, const long &mode, const std::str
zval *value = zend_hash_get_current_data(_data);
std::string current_path = (path == "" ? "" : path + "/") + std::to_string(num_index);
zval *next_result = zend_container::fetch_bnode_object_data(Z_OBJ_P(value))->search(needle, mode, current_path);
zval *next_result = zend_container::bnode_fetch_object_data(Z_OBJ_P(value))->search(needle, mode, current_path);
zend_hash_append_strings(Z_ARRVAL_P(zv), Z_ARRVAL_P(next_result));
}
......
......@@ -52,7 +52,7 @@ public:
ZVAL_OBJ(new_object, Z_OBJ_P(object)->handlers->clone_obj(object));
return Z_OBJ_P(new_object);
}
static inline bitem * fetch_bnode_object_data(zend_object *obj) {
static inline bitem * bnode_fetch_object_data(zend_object *obj) {
return (bitem *)(*((uintptr_t *)((char *)obj - sizeof(uintptr_t))));
}
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment