summaryrefslogtreecommitdiffstats
path: root/src/sp-string.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/sp-string.h')
-rw-r--r--src/sp-string.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/sp-string.h b/src/sp-string.h
index 790964214..9e12f8429 100644
--- a/src/sp-string.h
+++ b/src/sp-string.h
@@ -11,10 +11,8 @@
#include "sp-object.h"
#define SP_TYPE_STRING (sp_string_get_type ())
-#define SP_STRING(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SP_TYPE_STRING, SPString))
-#define SP_STRING_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SP_TYPE_STRING, SPStringClass))
-#define SP_IS_STRING(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SP_TYPE_STRING))
-#define SP_IS_STRING_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SP_TYPE_STRING))
+#define SP_STRING(obj) ((SPString*)obj)
+#define SP_IS_STRING(obj) (obj != NULL && static_cast<const SPObject*>(obj)->typeHierarchy.count(typeid(SPString)))
class CString;