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 2014/08/07 22:43:39 UTC

git commit: THRIFT-2589 const of BaseType in IDL generates static instead of const properties Client: C# Patch: Thomas Lazar

Repository: thrift
Updated Branches:
  refs/heads/master ca44a622d -> c20eeaae8


THRIFT-2589 const of BaseType in IDL generates static instead of const properties
Client: C#
Patch: Thomas Lazar


Project: http://git-wip-us.apache.org/repos/asf/thrift/repo
Commit: http://git-wip-us.apache.org/repos/asf/thrift/commit/c20eeaae
Tree: http://git-wip-us.apache.org/repos/asf/thrift/tree/c20eeaae
Diff: http://git-wip-us.apache.org/repos/asf/thrift/diff/c20eeaae

Branch: refs/heads/master
Commit: c20eeaae8296fa9d9de34b07fe8b21cf509c8884
Parents: ca44a62
Author: Jens Geyer <je...@apache.org>
Authored: Thu Aug 7 22:39:56 2014 +0200
Committer: Jens Geyer <je...@apache.org>
Committed: Thu Aug 7 22:41:24 2014 +0200

----------------------------------------------------------------------
 compiler/cpp/src/generate/t_csharp_generator.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/thrift/blob/c20eeaae/compiler/cpp/src/generate/t_csharp_generator.cc
----------------------------------------------------------------------
diff --git a/compiler/cpp/src/generate/t_csharp_generator.cc b/compiler/cpp/src/generate/t_csharp_generator.cc
index 11db5d6..7944df0 100644
--- a/compiler/cpp/src/generate/t_csharp_generator.cc
+++ b/compiler/cpp/src/generate/t_csharp_generator.cc
@@ -547,7 +547,7 @@ bool t_csharp_generator::print_const_value(std::ofstream& out, string name, t_ty
 
   if (!defval || needtype) {
     out <<
-      (in_static ? "" : "public static ") <<
+      (in_static ? "" : type->is_base_type() ? "public const " : "public static ") <<
       type_name(type) << " ";
   }
   if (type->is_base_type()) {