aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornyamatongwe <unknown>2008-12-16 11:11:29 +0000
committernyamatongwe <unknown>2008-12-16 11:11:29 +0000
commitf797cc6b8ca81530565c989d40ac9bc2b1952465 (patch)
tree57efc71d80bc020684ca94dce15b006207ecfd93
parent5d66605fc796320ed2915a4c319cda9abfb1dee1 (diff)
downloadscintilla-mirror-f797cc6b8ca81530565c989d40ac9bc2b1952465.tar.gz
Namespace work for OS X / XCode compatibility.
-rw-r--r--gtk/PlatGTK.cxx8
-rw-r--r--src/Document.cxx10
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