mirror of
https://github.com/ruby/ruby.git
synced 2025-09-17 17:43:59 +02:00
merge revision(s) 44569:44572,44576:44579,44581,44590:44594,44607,44608,44614,44615:
iseq.c: linear search * iseq.c (iseq_type_from_id): linear search instead of hash lookup for small fixed number keys. ------------------------------------------------------------------------ r44570 | nobu | 2014-01-12 17:11:32 +0900 (Sun, 12 Jan 2014) | 4 lines tcltklib.c: create_ip_exc format argument * ext/tk/tcltklib.c (create_ip_exc): format argument must not be a dynamic string, not to contain unescaped %. ------------------------------------------------------------------------ r44571 | nobu | 2014-01-12 17:11:34 +0900 (Sun, 12 Jan 2014) | 5 lines stubs.c: library name strings * ext/tk/stubs.c (ruby_open_tcl_dll, ruby_open_tk_dll): make library names by string literal concatenation at compilation time, not by sprintf() at runtime. ------------------------------------------------------------------------ r44572 | nobu | 2014-01-12 17:11:36 +0900 (Sun, 12 Jan 2014) | 1 line ext: use rb_sprintf() and rb_vsprintf() with PRIsVALUE * ext/bigdecimal/bigdecimal.c (CLASS_NAME): macro to wrap depending on PRIsVALUE for 1.9. [Backport #9406] * ext/bigdecimal/bigdecimal.c (DECIMAL_SIZE_OF_BITS): fallback definition for 2.1 or older. [ruby-core:59750] [Backport #9406] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@44659 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
b809254c8c
commit
8302aa5f95
22 changed files with 156 additions and 147 deletions
|
@ -1,5 +1,14 @@
|
|||
#include <fiddle.h>
|
||||
|
||||
#ifdef PRIsVALUE
|
||||
# define RB_OBJ_CLASSNAME(obj) rb_obj_class(obj)
|
||||
# define RB_OBJ_STRING(obj) (obj)
|
||||
#else
|
||||
# define PRIsVALUE "s"
|
||||
# define RB_OBJ_CLASSNAME(obj) rb_obj_classname(obj)
|
||||
# define RB_OBJ_STRING(obj) StringValueCStr(obj)
|
||||
#endif
|
||||
|
||||
VALUE cFiddleFunction;
|
||||
|
||||
static void
|
||||
|
@ -53,12 +62,13 @@ rb_fiddle_new_function(VALUE address, VALUE arg_types, VALUE ret_type)
|
|||
static int
|
||||
parse_keyword_arg_i(VALUE key, VALUE value, VALUE self)
|
||||
{
|
||||
if (key == ID2SYM(rb_intern("name"))) {
|
||||
rb_iv_set(self, "@name", value);
|
||||
} else {
|
||||
rb_raise(rb_eArgError, "unknown keyword: %"PRIsVALUE, key);
|
||||
}
|
||||
return ST_CONTINUE;
|
||||
if (key == ID2SYM(rb_intern("name"))) {
|
||||
rb_iv_set(self, "@name", value);
|
||||
} else {
|
||||
rb_raise(rb_eArgError, "unknown keyword: %"PRIsVALUE,
|
||||
RB_OBJ_STRING(key));
|
||||
}
|
||||
return ST_CONTINUE;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue