Thrift: Fix a bug with local reflection and namespaces.
authorDavid Reiss <dreiss@apache.org>
Sat, 9 Feb 2008 02:51:43 +0000 (02:51 +0000)
committerDavid Reiss <dreiss@apache.org>
Sat, 9 Feb 2008 02:51:43 +0000 (02:51 +0000)
commit407c9e7865ba63409bb842b9286f18fb3d19abc5
treebfe219a24694b9e93e32cb6883e422fc7cc613d7
parent6756f1351a718b33a09ed17781e40339fa2ef8cf
Thrift: Fix a bug with local reflection and namespaces.

Summary:
References to "local reflections" in other thrift files were not given
namespace prefixes, give undefined symbol errors.  This change
distinguishes between relfection names being generated for declarations
(not namespaced) and those that could be external references (namespaced).

Reviewed By: mcslee

Test Plan:
Got the following files to build and link correctly with -dense.

==> test1.thrift <==
cpp_namespace ns
enum foo { bar }

==> test2.thrift <==
include "test1.thrift"
enum dummy_enum_workaround { I_AM_A_WORKAROUND }
struct baz {
  1: test1.foo qux
}

Revert Plan: ok

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665472 13f79535-47bb-0310-9956-ffa450edef68
compiler/cpp/src/generate/t_cpp_generator.cc
compiler/cpp/src/generate/t_cpp_generator.h