From d8f98c588391ede8a5e4bb721ad0e718c7aef6d6 Mon Sep 17 00:00:00 2001 From: Scott Wood Date: Thu, 23 Feb 2012 19:44:48 -0600 Subject: [PATCH 1/1] Remove weak from downcast method. It makes no sense with inline functions. Signed-off-by: Scott Wood --- idlcomp/languages/c++/interface-caller.cc | 2 +- idlcomp/languages/c++/main.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/idlcomp/languages/c++/interface-caller.cc b/idlcomp/languages/c++/interface-caller.cc index 0f0d139..556293a 100644 --- a/idlcomp/languages/c++/interface-caller.cc +++ b/idlcomp/languages/c++/interface-caller.cc @@ -260,7 +260,7 @@ void CPPFile::output_internal(Interface *iface) void CPPFile::output_downcast_proto(Interface *iface, Interface *super) { - file << '\n' << indent << "static __attribute__((weak)) inline " + file << '\n' << indent << "static inline " << **iface->name << " downcast("; cpp_output_type(file, super, false, false); file << "oldptr);\n"; diff --git a/idlcomp/languages/c++/main.cc b/idlcomp/languages/c++/main.cc index 3e921e5..3157a55 100644 --- a/idlcomp/languages/c++/main.cc +++ b/idlcomp/languages/c++/main.cc @@ -527,7 +527,7 @@ void CPPFile::output_vstruct_main(Struct *sym) if (super) file << '\n' - << indent << "static __attribute__((weak)) " << name << " *downcast(::System::VStruct *base)\n" + << indent << "static " << name << " *downcast(::System::VStruct *base)\n" << indent << "{\n" << indent << "\tif (!base)\n" << indent << "\t\treturn NULL;\n\n" -- 2.39.2