• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

mrubyを超漢字で動作させる


Commit MetaInfo

Révision6f43e951635bf24b19868f13d18b8916e98695cc (tree)
l'heure2015-11-17 02:39:52
AuteurMav7 <battleroundscool@gmai...>
CommiterMav7

Message de Log

Added type annotation to YARD.

Change Summary

Modification

--- a/include/mruby.h
+++ b/include/mruby.h
@@ -222,19 +222,19 @@ typedef mrb_value (*mrb_func_t)(mrb_state *mrb, mrb_value);
222222 * //free(TheAnimals);
223223 * }
224224 *
225- * @param mrb The current mruby state.
226- * @param name The name of the defined class
227- * @param super The new class parent
228- * @return Reference to the newly defined class
225+ * @param [mrb_state *] mrb The current mruby state.
226+ * @param [const char *] name The name of the defined class.
227+ * @param [struct RClass *] super The new class parent.
228+ * @return [struct RClass *] Reference to the newly defined class.
229229 * @see mrb_define_class_under
230230 */
231231 MRB_API struct RClass *mrb_define_class(mrb_state *mrb, const char *name, struct RClass *super);
232232
233233 /**
234234 * Defines a new module.
235- * @param mrb_state* The current mruby state.
236- * @param char* The name of the module.
237- * @return Reference to the newly defined module.
235+ * @param [mrb_state *] mrb_state* The current mruby state.
236+ * @param [const char *] char* The name of the module.
237+ * @return [struct RClass *] Reference to the newly defined module.
238238 */
239239 MRB_API struct RClass *mrb_define_module(mrb_state *, const char*);
240240 MRB_API mrb_value mrb_singleton_class(mrb_state*, mrb_value);
@@ -246,9 +246,9 @@ MRB_API mrb_value mrb_singleton_class(mrb_state*, mrb_value);
246246 * module B
247247 * include A
248248 * end
249- * @param mrb_state* The current mruby state.
250- * @param RClass* A reference to module or a class.
251- * @param RClass* A reference to the module to be included.
249+ * @param [mrb_state *] mrb_state* The current mruby state.
250+ * @param [struct RClass *] RClass* A reference to module or a class.
251+ * @param [struct RClass *] RClass* A reference to the module to be included.
252252 */
253253 MRB_API void mrb_include_module(mrb_state*, struct RClass*, struct RClass*);
254254
@@ -259,9 +259,9 @@ MRB_API void mrb_include_module(mrb_state*, struct RClass*, struct RClass*);
259259 * module B
260260 * prepend A
261261 * end
262- * @param mrb_state* The current mruby state.
263- * @param RClass* A reference to module or a class.
264- * @param RClass* A reference to the module to be prepended.
262+ * @param [mrb_state *] mrb_state* The current mruby state.
263+ * @param [struct RClass *] RClass* A reference to module or a class.
264+ * @param [struct RClass *] RClass* A reference to the module to be prepended.
265265 */
266266 MRB_API void mrb_prepend_module(mrb_state*, struct RClass*, struct RClass*);
267267
@@ -284,10 +284,11 @@ MRB_API void mrb_prepend_module(mrb_state*, struct RClass*, struct RClass*);
284284 * mrb_define_method(mrb, mrb->kernel_module, "example_method", example_method, MRB_ARGS_NONE());
285285 * }
286286 *
287- * @param mrb The MRuby state reference.
288- * @param cla The class pointer where the method will be defined.
289- * @param func The function pointer to the method definition.
290- * @param aspec The method parameters declaration.
287+ * @param [mrb_state *] mrb The MRuby state reference.
288+ * @param [struct RClass *] cla The class pointer where the method will be defined.
289+ * @param [const char *] name The name of the method being defined.
290+ * @param [mrb_func_t] func The function pointer to the method definition.
291+ * @param [mrb_aspec] aspec The method parameters declaration.
291292 */
292293 MRB_API void mrb_define_method(mrb_state *mrb, struct RClass *cla, const char *name, mrb_func_t func, mrb_aspec aspec);
293294
@@ -317,11 +318,11 @@ MRB_API void mrb_define_method(mrb_state *mrb, struct RClass *cla, const char *n
317318 * mrb_define_class_method(mrb, foo, "bar", bar_method, MRB_ARGS_NONE());
318319 *
319320 * }
320- * @param mrb_state* The MRuby state reference.
321- * @param RClass* The class where the class method will be defined.
322- * @param char* The name of the class method.
323- * @param mrb_func_t The function pointer to the class method definition.
324- * @param mrb_aspec The method parameters declaration.
321+ * @param [mrb_state *] mrb_state* The MRuby state reference.
322+ * @param [struct RClass *] RClass* The class where the class method will be defined.
323+ * @param [const char *] char* The name of the class method being defined.
324+ * @param [mrb_func_t] mrb_func_t The function pointer to the class method definition.
325+ * @param [mrb_aspec] mrb_aspec The method parameters declaration.
325326 */
326327 MRB_API void mrb_define_class_method(mrb_state *, struct RClass *, const char *, mrb_func_t, mrb_aspec);
327328 MRB_API void mrb_define_singleton_method(mrb_state*, struct RObject*, const char*, mrb_func_t, mrb_aspec);
@@ -350,11 +351,11 @@ MRB_API void mrb_define_singleton_method(mrb_state*, struct RObject*, const char
350351 * mrb_define_module_function(mrb, foo, "bar", bar_method, MRB_ARGS_NONE());
351352 *
352353 * }
353- * @param mrb_state* The MRuby state reference.
354- * @param RClass* The module where the module function will be defined.
355- * @param char* The name of the module function.
356- * @param mrb_func_t The function pointer to the module function definition.
357- * @param mrb_aspec The method parameters declaration.
354+ * @param [mrb_state *] mrb_state* The MRuby state reference.
355+ * @param [struct RClass *] RClass* The module where the module function will be defined.
356+ * @param [const char *] char* The name of the module function being defined.
357+ * @param [mrb_func_t] mrb_func_t The function pointer to the module function definition.
358+ * @param [mrb_aspec] mrb_aspec The method parameters declaration.
358359 */
359360 MRB_API void mrb_define_module_function(mrb_state*, struct RClass*, const char*, mrb_func_t, mrb_aspec);
360361
@@ -385,10 +386,10 @@ MRB_API void mrb_define_module_function(mrb_state*, struct RClass*, const char*,
385386 * mrb_example_gem_final(mrb_state* mrb){
386387 *
387388 * }
388- * @param mrb_state* The MRuby state reference.
389- * @param RClass* A class or module the constant is defined in.
390- * @param name The name of the constant.
391- * @param mrb_value The value for the constant.
389+ * @param [mrb_state *] mrb_state* The MRuby state reference.
390+ * @param [struct RClass *] RClass* A class or module the constant is defined in.
391+ * @param [const char *] name The name of the constant being defined.
392+ * @param [mrb_value] mrb_value The value for the constant.
392393 */
393394 MRB_API void mrb_define_const(mrb_state*, struct RClass*, const char *name, mrb_value);
394395
@@ -449,9 +450,9 @@ MRB_API void mrb_define_const(mrb_state*, struct RClass*, const char *name, mrb_
449450 *
450451 * }
451452 *
452- * @param mrb_state* The mruby state reference.
453- * @param RClass* A class the method will be undefined from.
454- * @param constchar* The name of the method to be undefined.
453+ * @param [mrb_state*] mrb_state* The mruby state reference.
454+ * @param [struct RClass*] RClass* A class the method will be undefined from.
455+ * @param [const char*] constchar* The name of the method to be undefined.
455456 */
456457 MRB_API void mrb_undef_method(mrb_state*, struct RClass*, const char*);
457458
@@ -498,9 +499,9 @@ MRB_API void mrb_undef_method(mrb_state*, struct RClass*, const char*);
498499 * mrb_example_gem_final(mrb_state* mrb){
499500 *
500501 * }
501- * @param mrb_state* The mruby state reference.
502- * @param RClass* A class the class method will be undefined from.
503- * @param constchar* The name of the class method to be undefined.
502+ * @param [mrb_state*] mrb_state* The mruby state reference.
503+ * @param [RClass*] RClass* A class the class method will be undefined from.
504+ * @param [constchar*] constchar* The name of the class method to be undefined.
504505 */
505506 MRB_API void mrb_undef_class_method(mrb_state*, struct RClass*, const char*);
506507
@@ -527,11 +528,11 @@ MRB_API void mrb_undef_class_method(mrb_state*, struct RClass*, const char*);
527528 * obj = mrb_obj_new(mrb, example_class, 0, NULL); # => ExampleClass.new
528529 * mrb_p(mrb, obj); // => Kernel#p
529530 * }
530- * @param mrb The current mruby state.
531- * @param c Reference to the class of the new object.
532- * @param argc Number of arguments in argv
533- * @param argv Array of mrb_value to initialize the object
534- * @return The newly initialized object
531+ * @param [mrb_state*] mrb The current mruby state.
532+ * @param [RClass*] c Reference to the class of the new object.
533+ * @param [mrb_int] argc Number of arguments in argv
534+ * @param [const mrb_value *] argv Array of mrb_value to initialize the object
535+ * @return [mrb_value] The newly initialized object
535536 */
536537 MRB_API mrb_value mrb_obj_new(mrb_state *mrb, struct RClass *c, mrb_int argc, const mrb_value *argv);
537538
@@ -558,9 +559,9 @@ MRB_API mrb_value mrb_instance_new(mrb_state *mrb, mrb_value cv);
558559 * mrb_p(mrb, obj); // => Kernel#p
559560 * }
560561 *
561- * @param mrb The current mruby state.
562- * @param super The super class or parent.
563- * @return RClass* Reference to the new class.
562+ * @param [mrb_state*] mrb The current mruby state.
563+ * @param [struct RClass *] super The super class or parent.
564+ * @return [struct RClass *] Reference to the new class.
564565 */
565566 MRB_API struct RClass * mrb_class_new(mrb_state *mrb, struct RClass *super);
566567
@@ -575,8 +576,8 @@ MRB_API struct RClass * mrb_class_new(mrb_state *mrb, struct RClass *super);
575576 * example_module = mrb_module_new(mrb);
576577 * }
577578 *
578- * @param mrb The current mruby state.
579- * @return Reference to the new module.
579+ * @param [mrb_state*] mrb The current mruby state.
580+ * @return [struct RClass *] Reference to the new module.
580581 */
581582 MRB_API struct RClass * mrb_module_new(mrb_state *mrb);
582583
@@ -602,43 +603,43 @@ MRB_API struct RClass * mrb_module_new(mrb_state *mrb);
602603 * }
603604 * }
604605 *
605- * @param mrb The current mruby state.
606- * @param *name A string representing the name of the class.
607- * @return mrb_bool A boolean value.
606+ * @param [mrb_state*] mrb The current mruby state.
607+ * @param [const char *] name A string representing the name of the class.
608+ * @return [mrb_bool] A boolean value.
608609 */
609610 MRB_API mrb_bool mrb_class_defined(mrb_state *mrb, const char *name);
610611
611612 /**
612613 * Gets a class.
613- * @param mrb The current mruby state.
614- * @param name The name of the class.
615- * @return A reference to the class.
614+ * @param [mrb_state*] mrb The current mruby state.
615+ * @param [const char *] name The name of the class.
616+ * @return [struct RClass *] A reference to the class.
616617 */
617618 MRB_API struct RClass * mrb_class_get(mrb_state *mrb, const char *name);
618619
619620 /**
620621 * Gets a child class.
621- * @param mrb The current mruby state.
622- * @param outer The name of the parent class.
623- * @param name The name of the class.
624- * @return A reference to the class.
622+ * @param [mrb_state*] mrb The current mruby state.
623+ * @param [struct RClass *] outer The name of the parent class.
624+ * @param [const char *] name The name of the class.
625+ * @return [struct RClass *] A reference to the class.
625626 */
626627 MRB_API struct RClass * mrb_class_get_under(mrb_state *mrb, struct RClass *outer, const char *name);
627628
628629 /**
629630 * Gets a module.
630- * @param mrb The current mruby state.
631- * @param name The name of the module.
632- * @return A reference to the module.
631+ * @param [mrb_state*] mrb The current mruby state.
632+ * @param [const char *] name The name of the module.
633+ * @return [struct RClass *] A reference to the module.
633634 */
634635 MRB_API struct RClass * mrb_module_get(mrb_state *mrb, const char *name);
635636
636637 /**
637638 * Gets a module defined under another module.
638- * @param mrb The current mruby state.
639- * @param outer The name of the outer module.
640- * @param name The name of the module.
641- * @return A reference to the module.
639+ * @param [mrb_state*] mrb The current mruby state.
640+ * @param [struct RClass *] outer The name of the outer module.
641+ * @param [const char *] name The name of the module.
642+ * @return [struct RClass *] A reference to the module.
642643 */
643644 MRB_API struct RClass * mrb_module_get_under(mrb_state *mrb, struct RClass *outer, const char *name);
644645 MRB_API mrb_value mrb_notimplement_m(mrb_state*, mrb_value);
@@ -648,9 +649,9 @@ MRB_API mrb_value mrb_notimplement_m(mrb_state*, mrb_value);
648649 *
649650 * Equivalent to:
650651 * Object#dup
651- * @param mrb The current mruby state.
652- * @param obj Object to be duplicate.
653- * @return The newly duplicated object.
652+ * @param [mrb_state*] mrb The current mruby state.
653+ * @param [mrb_value] obj Object to be duplicate.
654+ * @return [mrb_value] The newly duplicated object.
654655 */
655656 MRB_API mrb_value mrb_obj_dup(mrb_state *mrb, mrb_value obj);
656657 MRB_API mrb_value mrb_check_to_integer(mrb_state *mrb, mrb_value val, const char *method);
@@ -690,21 +691,21 @@ MRB_API mrb_value mrb_check_to_integer(mrb_state *mrb, mrb_value val, const char
690691 * }
691692 * }
692693 *
693- * @param mrb The current mruby state.
694- * @param c A reference to a class.
695- * @param mid A symbol referencing a method id.
696- * @return mrb_bool A boolean value.
694+ * @param [mrb_state*] mrb The current mruby state.
695+ * @param [struct RClass *] c A reference to a class.
696+ * @param [mrb_sym] mid A symbol referencing a method id.
697+ * @return [mrb_bool] A boolean value.
697698 */
698699 MRB_API mrb_bool mrb_obj_respond_to(mrb_state *mrb, struct RClass* c, mrb_sym mid);
699700
700701 /**
701702 * Defines a new class under a given module
702703 *
703- * @param mrb The current mruby state.
704- * @param outer Reference to the module under which the new class will be defined
705- * @param name The name of the defined class
706- * @param super The new class parent
707- * @return Reference to the newly defined class
704+ * @param [mrb_state*] mrb The current mruby state.
705+ * @param [struct RClass *] outer Reference to the module under which the new class will be defined
706+ * @param [const char *] name The name of the defined class
707+ * @param [struct RClass *] super The new class parent
708+ * @return [struct RClass *] Reference to the newly defined class
708709 * @see mrb_define_class
709710 */
710711 MRB_API struct RClass * mrb_define_class_under(mrb_state *mrb, struct RClass *outer, const char *name, struct RClass *super);