You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@thrift.apache.org by ro...@apache.org on 2012/11/15 22:46:02 UTC

svn commit: r1410038 - /thrift/trunk/compiler/cpp/src/generate/t_py_generator.cc

Author: roger
Date: Thu Nov 15 21:46:01 2012
New Revision: 1410038

URL: http://svn.apache.org/viewvc?rev=1410038&view=rev
Log:
THRIFT-1747 Generated Python code incorrect when declaring constants of a struct type declared in an included thrift file 
Patch: Justin Judd

Modified:
    thrift/trunk/compiler/cpp/src/generate/t_py_generator.cc

Modified: thrift/trunk/compiler/cpp/src/generate/t_py_generator.cc
URL: http://svn.apache.org/viewvc/thrift/trunk/compiler/cpp/src/generate/t_py_generator.cc?rev=1410038&r1=1410037&r2=1410038&view=diff
==============================================================================
--- thrift/trunk/compiler/cpp/src/generate/t_py_generator.cc (original)
+++ thrift/trunk/compiler/cpp/src/generate/t_py_generator.cc Thu Nov 15 21:46:01 2012
@@ -518,7 +518,7 @@ string t_py_generator::render_const_valu
   } else if (type->is_enum()) {
     indent(out) << value->get_integer();
   } else if (type->is_struct() || type->is_xception()) {
-    out << type->get_name() << "(**{" << endl;
+    out << type_name(type) << "(**{" << endl;
     indent_up();
     const vector<t_field*>& fields = ((t_struct*)type)->get_members();
     vector<t_field*>::const_iterator f_iter;