summaryrefslogtreecommitdiffhomepage
path: root/mrbgems/mruby-struct
diff options
context:
space:
mode:
authorSeba Gamboa <[email protected]>2015-10-14 14:37:47 -0300
committerSeba Gamboa <[email protected]>2015-10-20 12:16:47 -0300
commit5cdcce8dbddd94ecb9503a0a1d47370c4ef97177 (patch)
tree07dae36bc4e2762a8d420fbea2e67b4a087ea260 /mrbgems/mruby-struct
parent84b70886cd9827593810264bf1f068044d5c6986 (diff)
downloadmruby-5cdcce8dbddd94ecb9503a0a1d47370c4ef97177.tar.gz
mruby-5cdcce8dbddd94ecb9503a0a1d47370c4ef97177.zip
Mark core gems with mrbgem tag
Diffstat (limited to 'mrbgems/mruby-struct')
-rw-r--r--mrbgems/mruby-struct/src/struct.c34
1 files changed, 18 insertions, 16 deletions
diff --git a/mrbgems/mruby-struct/src/struct.c b/mrbgems/mruby-struct/src/struct.c
index 342e3eb5e..e73482f68 100644
--- a/mrbgems/mruby-struct/src/struct.c
+++ b/mrbgems/mruby-struct/src/struct.c
@@ -739,26 +739,28 @@ mrb_struct_values_at(mrb_state *mrb, mrb_value self)
return mrb_get_values_at(mrb, self, RSTRUCT_LEN(self), argc, argv, struct_aref_int);
}
-
-/*
- * A <code>Struct</code> is a convenient way to bundle a number of
- * attributes together, using accessor methods, without having to write
- * an explicit class.
- *
- * The <code>Struct</code> class is a generator of specific classes,
- * each one of which is defined to hold a set of variables and their
- * accessors. In these examples, we'll call the generated class
- * "<i>Customer</i>Class," and we'll show an example instance of that
- * class as "<i>Customer</i>Inst."
- *
- * In the descriptions that follow, the parameter <i>symbol</i> refers
- * to a symbol, which is either a quoted string or a
- * <code>Symbol</code> (such as <code>:name</code>).
- */
void
mrb_mruby_struct_gem_init(mrb_state* mrb)
{
struct RClass *st;
+
+ /*
+ * A <code>Struct</code> is a convenient way to bundle a number of
+ * attributes together, using accessor methods, without having to write
+ * an explicit class.
+ *
+ * The <code>Struct</code> class is a generator of specific classes,
+ * each one of which is defined to hold a set of variables and their
+ * accessors. In these examples, we'll call the generated class
+ * "<i>Customer</i>Class," and we'll show an example instance of that
+ * class as "<i>Customer</i>Inst."
+ *
+ * In the descriptions that follow, the parameter <i>symbol</i> refers
+ * to a symbol, which is either a quoted string or a
+ * <code>Symbol</code> (such as <code>:name</code>).
+ *
+ * @mrbgem mruby-struct
+ */
st = mrb_define_class(mrb, "Struct", mrb->object_class);
mrb_define_class_method(mrb, st, "new", mrb_struct_s_def, MRB_ARGS_ANY()); /* 15.2.18.3.1 */