Revert "check Ruby strings for embedded null bytes"
This reverts commit 29dfda0011
.
It turned out to be a bad idea after all.
This commit is contained in:
parent
e72bced0f7
commit
88eca58268
|
@ -191,7 +191,7 @@ rb_get_args(int argc, VALUE *argv, const char *format, ...)
|
||||||
if (!RB_TYPE_P(tmp, RUBY_T_STRING))
|
if (!RB_TYPE_P(tmp, RUBY_T_STRING))
|
||||||
rb_raise(rb_eTypeError, "Argument %d: Expected string", argI);
|
rb_raise(rb_eTypeError, "Argument %d: Expected string", argI);
|
||||||
|
|
||||||
*s = StringValueCStr(tmp);
|
*s = RSTRING_PTR(tmp);
|
||||||
++argI;
|
++argI;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -32,7 +32,7 @@ DEF_TYPE(Bitmap);
|
||||||
static const char *objAsStringPtr(VALUE obj)
|
static const char *objAsStringPtr(VALUE obj)
|
||||||
{
|
{
|
||||||
VALUE str = rb_obj_as_string(obj);
|
VALUE str = rb_obj_as_string(obj);
|
||||||
return StringValueCStr(str);
|
return RSTRING_PTR(str);
|
||||||
}
|
}
|
||||||
|
|
||||||
void bitmapInitProps(Bitmap *b, VALUE self)
|
void bitmapInitProps(Bitmap *b, VALUE self)
|
||||||
|
|
Loading…
Reference in New Issue