You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@thrift.apache.org by je...@apache.org on 2020/06/09 21:26:17 UTC
[thrift] branch master updated: THRIFT-5082 Add a Class reference
for PHP enum $_TSPEC Client: php Patch: Stanislav Markevic
This is an automated email from the ASF dual-hosted git repository.
jensg pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git
The following commit(s) were added to refs/heads/master by this push:
new 3f78c70 THRIFT-5082 Add a Class reference for PHP enum $_TSPEC Client: php Patch: Stanislav Markevic
3f78c70 is described below
commit 3f78c70bbba82c733b1545d39eb5b489ac384e4c
Author: Stanislav Markevic <sm...@freelancer.com>
AuthorDate: Tue Feb 4 12:19:05 2020 +0000
THRIFT-5082 Add a Class reference for PHP enum $_TSPEC
Client: php
Patch: Stanislav Markevic
This closes #2000
---
compiler/cpp/src/thrift/generate/t_php_generator.cc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/compiler/cpp/src/thrift/generate/t_php_generator.cc b/compiler/cpp/src/thrift/generate/t_php_generator.cc
index 79bd5a2..e29ad77 100644
--- a/compiler/cpp/src/thrift/generate/t_php_generator.cc
+++ b/compiler/cpp/src/thrift/generate/t_php_generator.cc
@@ -746,9 +746,9 @@ void t_php_generator::generate_php_type_spec(ostream& out, t_type* t) {
t = get_true_type(t);
indent(out) << "'type' => " << type_to_enum(t) << "," << endl;
- if (t->is_base_type() || t->is_enum()) {
+ if (t->is_base_type()) {
// Noop, type is all we need
- } else if (t->is_struct() || t->is_xception()) {
+ } else if (t->is_struct() || t->is_xception() || t->is_enum()) {
indent(out) << "'class' => '" << php_namespace(t->get_program()) << t->get_name() << "',"
<< endl;
} else if (t->is_map()) {