return;
}
+ out <<
+ indent() << "$bin_accel = ($input instanceof TProtocol::$TBINARYPROTOCOLACCELERATED)"
+ << " && function_exists('thrift_protocol_binary_deserialize');" << endl;
+
out <<
indent() << "$xfer = 0;" << endl <<
indent() << "$fname = null;" << endl <<
generate_deserialize_container(out, type, name);
} else if (type->is_base_type() || type->is_enum()) {
- out << indent() << "if (($input instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_binary_deserialize')) {" << endl;
+ out << indent() << "if ($bin_accel) {" << endl;
indent_up();
string ttype_name;
if (type->is_enum()) {
}
out << endl;
}
- out << indent() << "}" << endl;
indent_down();
+ out << indent() << "}" << endl;
} else {
printf("DO NOT KNOW HOW TO DESERIALIZE FIELD '%s' TYPE '%s'\n",
tfield->get_name().c_str(), type->get_name().c_str());
void t_php_generator::generate_deserialize_container(ofstream &out,
t_type* ttype,
string prefix) {
- out << indent() << "if (($input instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_binary_deserialize'))" << endl;
+ out << indent() << "if ($bin_accel)" << endl;
scope_up(out);
string ttype_name;