From 9a571d41f56c86e290781492ba410070c34b3379 Mon Sep 17 00:00:00 2001 From: Richard Jones Date: Wed, 6 May 2009 15:20:15 +0100 Subject: RARRAY_LEN macro for Ruby < 1.9. Small strictness fix for OCaml < 3.10. --- ruby/ext/guestfs/_guestfs.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'ruby') 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 */ -- cgit