[opengtl-commits] [411] possible workaround for gcc 3.3 |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/opengtl-commits Archives
]
Revision: 411
Author: cyrille
Date: 2008-09-21 15:58:48 +0200 (Sun, 21 Sep 2008)
Log Message:
-----------
possible workaround for gcc 3.3
Modified Paths:
--------------
trunk/OpenGTL/OpenGTL/GTLCore/Function_p.cpp
trunk/OpenGTL/OpenGTL/GTLCore/Type.h
trunk/OpenGTL/OpenGTL/GTLCore/Type_p.h
Modified: trunk/OpenGTL/OpenGTL/GTLCore/Function_p.cpp
===================================================================
--- trunk/OpenGTL/OpenGTL/GTLCore/Function_p.cpp 2008-09-21 09:01:21 UTC (rev 410)
+++ trunk/OpenGTL/OpenGTL/GTLCore/Function_p.cpp 2008-09-21 13:58:48 UTC (rev 411)
@@ -95,7 +95,7 @@
std::vector<const llvm::Type*> llvmArguments;
for(unsigned int i = 0; i < arguments.size(); ++i)
{
- llvmArguments.push_back( arguments[i].type()->d->asArgumentType() );
+ llvmArguments.push_back( Type::Private::d( arguments[i].type() )->asArgumentType() );
}
std::vector<llvm::Function*> functions(arguments.size() + 1);
functions[arguments.size() ] = dynamic_cast<llvm::Function*>( _module->getOrInsertFunction( _symbolName, llvm::FunctionType::get(retType->d->type(), llvmArguments, false ) ) );
@@ -120,8 +120,8 @@
const GTLCore::Type* type = va_arg(argp, const GTLCore::Type*);
arguments.push_back(GTLCore::Parameter("", type, false, false, GTLCore::Value() ) );
#ifndef NDEBUG
- GTL_DEBUG( *type->d->asArgumentType() << " == " << *FTy->getParamType(i) );
- GTL_ASSERT( type->d->asArgumentType() == FTy->getParamType(i) );
+ GTL_DEBUG( *Type::Private::d( type )->asArgumentType() << " == " << *FTy->getParamType(i) );
+ GTL_ASSERT( Type::Private::d( type )->asArgumentType() == FTy->getParamType(i) );
#endif
}
va_end(argp);
Modified: trunk/OpenGTL/OpenGTL/GTLCore/Type.h
===================================================================
--- trunk/OpenGTL/OpenGTL/GTLCore/Type.h 2008-09-21 09:01:21 UTC (rev 410)
+++ trunk/OpenGTL/OpenGTL/GTLCore/Type.h 2008-09-21 13:58:48 UTC (rev 411)
@@ -200,7 +200,11 @@
*/
bool isNumber() const;
private:
+#if __GNUC__ == 3 && (__GNUC_MINOR__ <= 3 && __GNUC_MINOR__ <= 3)
+ public:
+#endif
struct Private;
+ private:
Private* const d;
};
}
Modified: trunk/OpenGTL/OpenGTL/GTLCore/Type_p.h
===================================================================
--- trunk/OpenGTL/OpenGTL/GTLCore/Type_p.h 2008-09-21 09:01:21 UTC (rev 410)
+++ trunk/OpenGTL/OpenGTL/GTLCore/Type_p.h 2008-09-21 13:58:48 UTC (rev 411)
@@ -78,6 +78,11 @@
struct Type::Private {
friend class Type;
public:
+ static inline const Private* d( const GTLCore::Type* _type )
+ {
+ return _type->d;
+ }
+ public:
Private() : m_type(0), structDataMembers(0), structFunctionMembers(0), structPrivateFunctionMembers(0), m_visitor(0) {}
Private( Type::DataType _dataType );
~Private();