Commit 3247b46b authored by Frederick Zhang's avatar Frederick Zhang

code style

parent 10d2e215
......@@ -277,9 +277,9 @@ zval * bdict::to_array(const bool include_meta) const {
if (include_meta) {
zval *zv_outer = new zval();
array_init(zv_outer);
add_assoc_string(zv_outer, (char *) "_type", (char *) "bdict");
add_assoc_long(zv_outer, (char *) "_length", length());
add_assoc_zval(zv_outer, (char *) "_data", zv);
add_assoc_string(zv_outer, (char *)"_type", (char *)"bdict");
add_assoc_long(zv_outer, (char *)"_length", length());
add_assoc_zval(zv_outer, (char *)"_data", zv);
return zv_outer;
}
return zv;
......
......@@ -48,9 +48,9 @@ zval * bint::to_array(const bool include_meta) const {
zval *zv = new zval();
if (include_meta) {
array_init(zv);
add_assoc_string(zv, (char *) "_type", (char *) "bint");
add_assoc_long(zv, (char *) "_length", length());
add_assoc_long(zv, (char *) "_data", _value);
add_assoc_string(zv, (char *)"_type", (char *)"bint");
add_assoc_long(zv, (char *)"_length", length());
add_assoc_long(zv, (char *)"_data", _value);
} else {
ZVAL_LONG(zv, _value);
}
......
......@@ -304,9 +304,9 @@ zval * blist::to_array(const bool include_meta) const {
if (include_meta) {
zval *zv_outer = new zval();
array_init(zv_outer);
add_assoc_string(zv_outer, (char *) "_type", (char *) "blist");
add_assoc_long(zv_outer, (char *) "_length", length());
add_assoc_zval(zv_outer, (char *) "_data", zv);
add_assoc_string(zv_outer, (char *)"_type", (char *)"blist");
add_assoc_long(zv_outer, (char *)"_length", length());
add_assoc_zval(zv_outer, (char *)"_data", zv);
return zv_outer;
}
return zv;
......
......@@ -51,9 +51,9 @@ zval * bstr::to_array(const bool include_meta) const {
if (include_meta) {
array_init(zv);
if (_value.length() == 0) return zv;
add_assoc_string(zv, (char *) "_type", (char *) "bstr");
add_assoc_long(zv, (char *) "_length", length());
add_assoc_stringl(zv, (char *) "_data", _data, _value.length());
add_assoc_string(zv, (char *)"_type", (char *)"bstr");
add_assoc_long(zv, (char *)"_length", length());
add_assoc_stringl(zv, (char *)"_data", _data, _value.length());
} else {
ZVAL_STRINGL(zv, _data, _value.length());
}
......
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