search for: id2sym

Displaying 7 results from an estimated 7 matches for "id2sym".

Did you mean: dlsym
2011 Dec 08
0
[hivex] [PATCH 2/8] generator: Add new return type to ABI: RLenValue
...ams @ [["&t"; "&len"]] + | RLenValue -> c_params @ [["&len"]] | _ -> c_params in let c_params = List.concat c_params in @@ -3546,6 +3619,11 @@ get_values (VALUE valuesv, size_t *nr_values) pr " rb_hash_aset (rv, ID2SYM (rb_intern (\"len\")), INT2NUM (len));\n"; pr " rb_hash_aset (rv, ID2SYM (rb_intern (\"type\")), INT2NUM (t));\n"; pr " return rv;\n" + | RLenValue -> + pr " VALUE rv = rb_hash_new ();\n"; + pr "...
2011 Oct 19
1
[hivex][PATCH 2/8] generator: Add new return type to ABI: RLenValue
...ams @ [["&t"; "&len"]] + | RLenValue -> c_params @ [["&len"]] | _ -> c_params in let c_params = List.concat c_params in @@ -3497,6 +3570,11 @@ get_values (VALUE valuesv, size_t *nr_values) pr " rb_hash_aset (rv, ID2SYM (rb_intern (\"len\")), INT2NUM (len));\n"; pr " rb_hash_aset (rv, ID2SYM (rb_intern (\"type\")), INT2NUM (t));\n"; pr " return rv;\n" + | RLenValue -> + pr " VALUE rv = rb_hash_new ();\n"; + pr "...
2011 Aug 31
1
[PATCH] hivex: Add byte runs for nodes and values
...Qnil;\n" | RHive -> pr " return Data_Wrap_Struct (c_hivex, NULL, ruby_hivex_free, r);\n" + | RSize | RNode | RValue | RInt64 -> @@ -3457,6 +3616,14 @@ get_values (VALUE valuesv, size_t *nr_values) pr " rb_hash_aset (rv, ID2SYM (rb_intern (\"len\")), INT2NUM (len));\n"; pr " rb_hash_aset (rv, ID2SYM (rb_intern (\"type\")), INT2NUM (t));\n"; pr " return rv;\n" + | RLenNode -> + pr " VALUE rv = rb_hash_new ();\n"; + pr "...
2011 Jan 05
0
Fwd: Review of libguestfs ruby bindings
...es that they are interested in. If you care to look, an example in the ruby-libvirt code is ext/libvirt/domain.c:libvirt_dom_memory_peek() 5) The way that hash lookups are done are a little complicated. For instance, ruby_guestfs_add_drive_opts() uses: VALUE v; v = rb_hash_lookup (optargsv, ID2SYM (rb_intern ("readonly"))); to get at the hash symbol. In ruby-libvirt I tend to do: v = rb_hash_aref(optsargv, rb_str_new2("readonly")); That being said, your way may actually be faster since you aren't allocating a new object. Minor in any case, they both work. 6) I...
2013 Dec 27
0
[PATCH] ruby: Fix .new method (RHBZ#1046509).
...t (c_guestfs, NULL, ruby_guestfs_free, g); +} +static unsigned +parse_flags (int argc, VALUE *argv) +{ + volatile VALUE optargsv; unsigned flags = 0; volatile VALUE v; + + optargsv = argc == 1 ? argv[0] : rb_hash_new (); + Check_Type (optargsv, T_HASH); + v = rb_hash_lookup (optargsv, ID2SYM (rb_intern (\"environment\"))); if (v != Qnil && !RTEST (v)) flags |= GUESTFS_CREATE_NO_ENVIRONMENT; @@ -164,6 +170,56 @@ ruby_guestfs_create (int argc, VALUE *argv, VALUE m) if (v != Qnil && !RTEST (v)) flags |= GUESTFS_CREATE_NO_CLOSE_ON_EXIT; + return...
2012 Jan 09
1
[PATCH 1/2] generator: Rename java_structs to camel_structs to better reflect their purpose
This map was originally included just for the java bindings, but is generally useful to any binding which uses camel case by requirement or convention. --- generator/generator_haskell.ml | 4 ++-- generator/generator_java.ml | 10 +++++----- generator/generator_main.ml | 2 +- generator/generator_structs.ml | 12 +++++------- generator/generator_structs.mli | 8 ++++---- 5
2016 Dec 08
4
[PATCH] generator: Share Common_utils code.
...in @@ -295,7 +296,7 @@ and generate_ruby_c actions () = List.iter ( fun argt -> let n = name_of_optargt argt in - let uc_n = String.uppercase n in + let uc_n = String.uppercase_ascii n in pr " v = rb_hash_lookup (optargsv, ID2SYM (rb_intern (\"%s\")));\n" n; pr " if (v != Qnil) {\n"; (match argt with @@ -483,7 +484,7 @@ Init__guestfs (void) List.iter ( fun (name, bitmask) -> pr " rb_define_const (m_guestfs, \"EVENT_%s\",\n" - (...