RARRAY_LEN macro for Ruby < 1.9. Small strictness fix for OCaml < 3.10.
[libguestfs.git] / ruby / ext / guestfs / _guestfs.c
index 83486e7..f235c5a 100644 (file)
 
 #include "extconf.h"
 
+/* For Ruby < 1.9 */
+#ifndef RARRAY_LEN
+#define RARRAY_LEN(r) (RARRAY((r))->len)
+#endif
+
 static VALUE m_guestfs;                        /* guestfs module */
 static VALUE c_guestfs;                        /* guestfs_h handle */
 static VALUE e_Error;                  /* used for all errors */