summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2017-08-11 12:51:45 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2017-08-11 12:51:45 +0900
commit8f6b2121d93504f1b77e97c8fcf276a74ce7b4cc (patch)
treea58eb38745d0de1ca5e957b3456fff76758e1a7c
parent4e2f4f42801edf61c977c938d9b66dc116779124 (diff)
downloadmruby-8f6b2121d93504f1b77e97c8fcf276a74ce7b4cc.tar.gz
mruby-8f6b2121d93504f1b77e97c8fcf276a74ce7b4cc.zip
Update document comment of array C API functions.
-rw-r--r--include/mruby/array.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/include/mruby/array.h b/include/mruby/array.h
index 70cc3a250..1b0c6a350 100644
--- a/include/mruby/array.h
+++ b/include/mruby/array.h
@@ -204,7 +204,7 @@ MRB_API void mrb_ary_replace(mrb_state *mrb, mrb_value self, mrb_value other);
MRB_API mrb_value mrb_check_array_type(mrb_state *mrb, mrb_value self);
/*
- * Unshift an element into an array
+ * Unshift an element into the array
*
* Equivalent to:
*
@@ -215,6 +215,17 @@ MRB_API mrb_value mrb_check_array_type(mrb_state *mrb, mrb_value self);
* @param item The item to unshift.
*/
MRB_API mrb_value mrb_ary_unshift(mrb_state *mrb, mrb_value self, mrb_value item);
+
+/*
+ * Get nth element in the array
+ *
+ * Equivalent to:
+ *
+ * ary[offset]
+ *
+ * @param ary The target array.
+ * @param offset The element position (negative counts from the tail).
+ */
MRB_API mrb_value mrb_ary_entry(mrb_value ary, mrb_int offset);
/*
@@ -231,7 +242,7 @@ MRB_API mrb_value mrb_ary_entry(mrb_value ary, mrb_int offset);
MRB_API mrb_value mrb_ary_shift(mrb_state *mrb, mrb_value self);
/*
- * Removes all elements from this array
+ * Removes all elements from the array
*
* Equivalent to:
*