diff options
author | Richard Jones <rich@hakodate.home.annexia.org> | 2009-05-06 15:20:15 +0100 |
---|---|---|
committer | Richard Jones <rich@hakodate.home.annexia.org> | 2009-05-06 15:20:15 +0100 |
commit | 9a571d41f56c86e290781492ba410070c34b3379 (patch) | |
tree | de0a45a68a22349d29eeb2ab21633d3e0364adc9 /src | |
parent | 76758f42b1abc89d5857697c87ead5036ed81b13 (diff) | |
download | libguestfs-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 'src')
-rwxr-xr-x | src/generator.ml | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/generator.ml b/src/generator.ml index 4c8c2e1b..45e8c3f7 100755 --- a/src/generator.ml +++ b/src/generator.ml @@ -5676,6 +5676,11 @@ and generate_ruby_c () = #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 */ @@ -6245,7 +6250,7 @@ Java_com_redhat_et_libguestfs_GuestFS__1close let needs_i = (match fst style with | RStringList _ | RPVList _ | RVGList _ | RLVList _ -> true - | RErr _ | RBool _ | RInt _ | RInt64 _ | RConstString _ + | RErr | RBool _ | RInt _ | RInt64 _ | RConstString _ | RString _ | RIntBool _ | RStat _ | RStatVFS _ | RHashtable _ -> false) || List.exists (function StringList _ -> true | _ -> false) (snd style) in |