--
-$Id: ChangeLog 26 2005-04-09 17:50:00Z tilman $
+$Id: ChangeLog 28 2005-04-11 20:58:23Z tilman $
++
+2005-04-11 Tilman Sauerbeck (tilman at code-monkey de)
+ * ext/ext.c: Use StringValue() instead of
+ Check_Type(blah, T_STRING)
+
2005-04-09 Tilman Sauerbeck (tilman at code-monkey de)
* Released version 0.1.2
/*
- * $Id: ext.c 13 2005-03-27 18:35:51Z tilman $
+ * $Id: ext.c 28 2005-04-11 20:58:23Z tilman $
*
* Copyright (c) 2005 Tilman Sauerbeck (tilman at code-monkey de)
*
#include <ruby.h>
#define CHECK_KEY(key) \
- Check_Type ((key), T_STRING); \
- if (rb_funcall ((key), rb_intern ("include?"), \
- 1, INT2FIX (0)) == Qtrue) \
+ StringValue((key)); \
+\
+ if (rb_funcall (key, rb_intern ("include?"), \
+ 1, INT2FIX (0)) == Qtrue) \
rb_raise (rb_eArgError, "key must not contain binary zeroes");
static VALUE c_close (VALUE self);
rb_scan_args (argc, argv, "11", &file, &mode);
- Check_Type (file, T_STRING);
+ StringValue (file);
if (!NIL_P (mode)) {
- Check_Type (mode, T_STRING);
+ StringValue (mode);
tmp = StringValuePtr (mode);
if (!strcmp (tmp, "r+"))
rb_scan_args (argc, argv, "01", &glob);
- if (!NIL_P (glob)) {
- Check_Type (glob, T_STRING);
+ if (!NIL_P (glob))
tmp = StringValuePtr (glob);
- }
ret = rb_ary_new ();
comp = Qtrue;
CHECK_KEY (key);
- Check_Type (buf, T_STRING);
+ StringValue (buf);
n = eet_write (*ef, StringValuePtr (key),
StringValuePtr (buf), RSTRING (buf)->len,
has_alpha = Qfalse;
CHECK_KEY (key);
- Check_Type (buf, T_STRING);
+ StringValue (buf);
Check_Type (w, T_FIXNUM);
Check_Type (h, T_FIXNUM);