We now use real structs to wrap objects.
[ruby-esmart.git] / src / rb_esmart.h
index 118847b05fa075b4a8e698b1395e896dcdeddf28..a6e3b0ab7dcb0743a679d62efdc893a6e2032ff6 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id$
+ * $Id: rb_esmart.h 52 2004-08-01 10:19:14Z tilman $
  *
  * Copyright (C) 2004 Tilman Sauerbeck (tilman at code-monkey de)
  *
 #define GET_OBJ(obj, type, o) \
        type *(o) = NULL; \
 \
-       Data_Get_Struct ((obj), type, (o)); \
-\
-       if (!*(o)) { \
-               rb_raise (rb_eException, \
-                         "%s destroyed already", \
-                         rb_obj_classname ((obj))); \
-               return Qnil; \
-       }
+       Data_Get_Struct ((obj), type, (o));
 
 #define CHECK_CLASS(val, klass) \
        if (!rb_obj_is_kind_of ((val), (klass))) { \
@@ -42,6 +35,8 @@
                return Qnil; \
        }
 
-VALUE mEsmart;
+#ifndef __RB_ESMART_C
+extern VALUE mEsmart;
+#endif
 
 #endif