Feature #9638 ยป 0001-ID-is-always-uint32_t.patch
ext/dl/cfunc.c | ||
---|---|---|
}
|
||
else{
|
||
rb_raise(rb_eDLError, "unsupported call type: %"PRIxVALUE,
|
||
cfunc->calltype);
|
||
(VALUE)cfunc->calltype);
|
||
}
|
||
}
|
||
include/ruby/ruby.h | ||
---|---|---|
#if defined HAVE_UINTPTR_T && 0
|
||
typedef uintptr_t VALUE;
|
||
typedef uintptr_t ID;
|
||
# define SIGNED_VALUE intptr_t
|
||
# define SIZEOF_VALUE SIZEOF_UINTPTR_T
|
||
# undef PRI_VALUE_PREFIX
|
||
#elif SIZEOF_LONG == SIZEOF_VOIDP
|
||
typedef unsigned long VALUE;
|
||
typedef unsigned long ID;
|
||
# define SIGNED_VALUE long
|
||
# define SIZEOF_VALUE SIZEOF_LONG
|
||
# define PRI_VALUE_PREFIX "l"
|
||
#elif SIZEOF_LONG_LONG == SIZEOF_VOIDP
|
||
typedef unsigned LONG_LONG VALUE;
|
||
typedef unsigned LONG_LONG ID;
|
||
# define SIGNED_VALUE LONG_LONG
|
||
# define LONG_LONG_VALUE 1
|
||
# define SIZEOF_VALUE SIZEOF_LONG_LONG
|
||
... | ... | |
# error ---->> ruby requires sizeof(void*) == sizeof(long) or sizeof(LONG_LONG) to be compiled. <<----
|
||
#endif
|
||
typedef uint32_t ID;
|
||
typedef char ruby_check_sizeof_int[SIZEOF_INT == sizeof(int) ? 1 : -1];
|
||
typedef char ruby_check_sizeof_long[SIZEOF_LONG == sizeof(long) ? 1 : -1];
|
||
#ifdef HAVE_LONG_LONG
|
iseq.c | ||
---|---|---|
if (typename)
|
||
rb_raise(rb_eTypeError, "unsupport type: :%"PRIsVALUE, typename);
|
||
else
|
||
rb_raise(rb_eTypeError, "unsupport type: %p", (void *)typeid);
|
||
rb_raise(rb_eTypeError, "unsupport type: %p",
|
||
(void *)(VALUE)typeid);
|
||
}
|
||
if (parent == Qnil) {
|
marshal.c | ||
---|---|---|
else {
|
||
sym = rb_id2str(id);
|
||
if (!sym) {
|
||
rb_raise(rb_eTypeError, "can't dump anonymous ID %"PRIdVALUE, id);
|
||
rb_raise(rb_eTypeError, "can't dump anonymous ID %"PRIdVALUE,
|
||
(VALUE)id);
|
||
}
|
||
encname = encoding_name(sym, arg);
|
||
if (NIL_P(encname) ||
|
vm_method.c | ||
---|---|---|
break;
|
||
case VM_METHOD_TYPE_ATTRSET:
|
||
case VM_METHOD_TYPE_IVAR:
|
||
def->body.attr.id = (ID)opts;
|
||
def->body.attr.id = *(ID *)opts;
|
||
RB_OBJ_WRITE(klass, &def->body.attr.location, Qfalse);
|
||
th = GET_THREAD();
|
||
cfp = rb_vm_get_ruby_level_next_cfp(th, th->cfp);
|
||
... | ... | |
}
|
||
attriv = rb_intern_str(rb_sprintf("@%"PRIsVALUE, aname));
|
||
if (read) {
|
||
rb_add_method(klass, id, VM_METHOD_TYPE_IVAR, (void *)attriv, noex);
|
||
rb_add_method(klass, id, VM_METHOD_TYPE_IVAR, &attriv, noex);
|
||
}
|
||
if (write) {
|
||
rb_add_method(klass, rb_id_attrset(id), VM_METHOD_TYPE_ATTRSET, (void *)attriv, noex);
|
||
rb_add_method(klass, rb_id_attrset(id), VM_METHOD_TYPE_ATTRSET, &attriv, noex);
|
||
}
|
||
}
|
||