From f797cc6b8ca81530565c989d40ac9bc2b1952465 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Tue, 16 Dec 2008 11:11:29 +0000 Subject: Namespace work for OS X / XCode compatibility. --- gtk/PlatGTK.cxx | 8 +++++++- src/Document.cxx | 10 ++++++---- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/gtk/PlatGTK.cxx b/gtk/PlatGTK.cxx index 486ce896c..03bb57d26 100644 --- a/gtk/PlatGTK.cxx +++ b/gtk/PlatGTK.cxx @@ -677,7 +677,13 @@ void Font::Release() { id = 0; } -class SurfaceImpl : public Surface { +// Required on OS X +#ifdef SCI_NAMESPACE +class Scintilla::SurfaceImpl : public Surface +#else +class SurfaceImpl : public Surface +#endif +{ encodingType et; GdkDrawable *drawable; GdkGC *gc; diff --git a/src/Document.cxx b/src/Document.cxx index a5cdf2fb6..9dca92035 100644 --- a/src/Document.cxx +++ b/src/Document.cxx @@ -1658,15 +1658,17 @@ const char *BuiltinRegex::SubstituteByPosition(Document* doc, const char *text, #ifndef SCI_OWNREGEX #ifdef SCI_NAMESPACE -namespace Scintilla { -#endif -RegexSearchBase *CreateRegexSearch(CharClassify *charClassTable) { +RegexSearchBase *Scintilla::CreateRegexSearch(CharClassify *charClassTable) { return new BuiltinRegex(charClassTable); } -#ifdef SCI_NAMESPACE +#else + +RegexSearchBase *CreateRegexSearch(CharClassify *charClassTable) { + return new BuiltinRegex(charClassTable); } + #endif #endif -- cgit v1.2.3