summaryrefslogtreecommitdiffstats
path: root/ruby
diff options
context:
space:
mode:
authorRichard Jones <rich@hakodate.home.annexia.org>2009-05-06 15:20:15 +0100
committerRichard Jones <rich@hakodate.home.annexia.org>2009-05-06 15:20:15 +0100
commit9a571d41f56c86e290781492ba410070c34b3379 (patch)
treede0a45a68a22349d29eeb2ab21633d3e0364adc9 /ruby
parent76758f42b1abc89d5857697c87ead5036ed81b13 (diff)
downloadlibguestfs-9a571d41f56c86e290781492ba410070c34b3379.tar.gz
libguestfs-9a571d41f56c86e290781492ba410070c34b3379.tar.xz
libguestfs-9a571d41f56c86e290781492ba410070c34b3379.zip
RARRAY_LEN macro for Ruby < 1.9. Small strictness fix for OCaml < 3.10.
Diffstat (limited to 'ruby')
-rw-r--r--ruby/ext/guestfs/_guestfs.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/ruby/ext/guestfs/_guestfs.c b/ruby/ext/guestfs/_guestfs.c
index 83486e75..f235c5a5 100644
--- a/ruby/ext/guestfs/_guestfs.c
+++ b/ruby/ext/guestfs/_guestfs.c
@@ -28,6 +28,11 @@
#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 */