/*
- * $Id: rb_edje.c 331 2005-04-28 18:17:21Z tilman $
+ * $Id: rb_edje.c 332 2005-04-28 18:37:16Z tilman $
*
* Copyright (C) 2004 Tilman Sauerbeck (tilman at code-monkey de)
*
static VALUE c_msg_init (int argc, VALUE *argv, VALUE self)
{
- VALUE val;
+ VALUE id, val;
- rb_scan_args (argc, argv, "01", &val);
+ if (argc == 2)
+ rb_scan_args (argc, argv, "11", &id, &val);
+ else
+ rb_scan_args (argc, argv, "1*", &id, &val);
+
+ Check_Type (id, T_FIXNUM);
- rb_iv_set (self, "@id", UINT2NUM (0));
+ rb_iv_set (self, "@id", UINT2NUM (id));
rb_iv_set (self, "@value", val);
return self;