summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Bachin <antonbachin@yahoo.com>2014-01-28 13:24:13 +0100
committerMurray Cumming <murrayc@murrayc.com>2014-01-28 13:26:21 +0100
commitcefceb0dc246b22e4c97d76bf04585f3a62e4b4d (patch)
tree08e796130701ad18ddf299600177d3a180d21685
parent798a292d2ec0c05e6ccf9108c6a973651a3ddcfe (diff)
Allow use from Objective-C instead of just allowing building.cairomm-1.10
* cairomm/fontface.h: Surround the include line in surface.h with some directives that undefine nil and then redefine it. * cairomm/surface.h: This aso undefined nil but this appears to be unnecessary. Bug #66328
-rw-r--r--cairomm/fontface.h8
-rw-r--r--cairomm/surface.h5
2 files changed, 4 insertions, 9 deletions
diff --git a/cairomm/fontface.h b/cairomm/fontface.h
index 007b40f..464332a 100644
--- a/cairomm/fontface.h
+++ b/cairomm/fontface.h
@@ -25,14 +25,6 @@
#include <cairomm/types.h>
#include <cairomm/refptr.h>
-/* following is required for OS X */
-
-#ifdef nil
-#undef nil
-#endif
-
-/* end OS X */
-
#include <cairo.h>
#ifdef CAIRO_HAS_FT_FONT
#include <cairo-ft.h>
diff --git a/cairomm/surface.h b/cairomm/surface.h
index 64412cb..379742d 100644
--- a/cairomm/surface.h
+++ b/cairomm/surface.h
@@ -26,11 +26,14 @@
#ifdef nil
#undef nil
+#include <sigc++/slot.h>
+#define nil NULL
+#else
+#include <sigc++/slot.h>
#endif
/* end OS X */
-#include <sigc++/slot.h>
#include <cairomm/enums.h>
#include <cairomm/exception.h>
#include <cairomm/device.h>