[Pkg-ace-devel] Bug#243062: Patch for bug #243062
Thomas Girard
Thomas Girard <thomas.g.girard@free.fr>, 243062@bugs.debian.org
Sun, 02 May 2004 17:01:18 +0200
This is a multi-part message in MIME format.
--------------030201000509060000080002
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Hello,
the bug #243062 was fixed upstream in version 5.4.1+1.4.1 of ACE+TAO.
This bug was discovered just after version 5.4.0+1.4.0 was launched.
More details can be found here:
http://groups.yahoo.com/group/tao-bugs/message/3704
The attached patch should solve this bug.
HTH,
Thomas
--------------030201000509060000080002
Content-Type: text/plain;
name="patch-243062"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="patch-243062"
--- orig/TAO/TAO_IDL/ast/ast_type.cpp
+++ mod/TAO/TAO_IDL/ast/ast_type.cpp
@@ -68,6 +68,7 @@
// IDL type constructs.
#include "ast_type.h"
+#include "ast_typedef.h"
#include "ast_visitor.h"
#include "utl_identifier.h"
#include "idl_defines.h"
@@ -231,6 +232,23 @@
suffix,
prefix);
}
+
+AST_Type *
+AST_Type::unaliased_type (void)
+{
+ AST_Type *t = this;
+ AST_Typedef *td = 0;
+ AST_Decl::NodeType nt = this->node_type ();
+
+ while (nt == AST_Decl::NT_typedef)
+ {
+ td = AST_Typedef::narrow_from_decl (t);
+ t = td->base_type ();
+ nt = t->node_type ();
+ }
+
+ return t;
+}
// This is the real thing used by the method above.
const char *
--- orig/TAO/TAO_IDL/be/be_visitor_operation/operation.cpp
+++ mod/TAO/TAO_IDL/be/be_visitor_operation/operation.cpp
@@ -706,11 +706,16 @@
}
}
+ // We need the unaliased type name to make the code block below
+ // work correctly.
+ AST_Type *ut = bt->unaliased_type ();
+ nt = ut->node_type ();
+
// For the four predefined types below, we use the helper struct
// type, in order to disambiguate the template parameter.
if (nt == AST_Decl::NT_pre_defined)
{
- AST_PredefinedType *pdt = AST_PredefinedType::narrow_from_decl (bt);
+ AST_PredefinedType *pdt = AST_PredefinedType::narrow_from_decl (ut);
switch (pdt->pt ())
{
--- orig/TAO/TAO_IDL/include/ast_type.h
+++ mod/TAO/TAO_IDL/include/ast_type.h
@@ -128,6 +128,9 @@
const char *suffix = 0,
const char *prefix = 0);
// Type name of a node used when generating declarations.
+
+ AST_Type *unaliased_type (void);
+ // Utility function to make sure we are using the unaliased type.
// Narrowing.
DEF_NARROW_METHODS1(AST_Type, AST_Decl);
--- orig/debian/changelog
+++ mod/debian/changelog
@@ -1,3 +1,10 @@
+ace (5.4.0.1-2) unstable; urgency=low
+
+ * TGG: Fix bug 243062 using information provided on
+ http://groups.yahoo.com/group/tao-bugs/message/3704
+
+ -- Thomas Girard <thomas.g.girard@free.fr> Sun, 2 May 2004 10:57:58 +0200
+
ace (5.4.0.1-1) unstable; urgency=low
* KM: release to fix the timestamp errors in the upstream source.
--------------030201000509060000080002--