• 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évision6ce31f334eec218905035fc5a3e8b1b7d43fae3e (tree)
l'heure2015-11-17 02:54:19
AuteurYukihiro "Matz" Matsumoto <matz@ruby...>
CommiterYukihiro "Matz" Matsumoto

Message de Log

Merge pull request #3017 from Mav7/master

Added type annotation to YARD.

Change Summary

Modification

--- a/include/mruby.h
+++ b/include/mruby.h
@@ -189,19 +189,19 @@ typedef mrb_value (*mrb_func_t)(mrb_state *mrb, mrb_value);
189189 * //free(TheAnimals);
190190 * }
191191 *
192- * @param mrb The current mruby state.
193- * @param name The name of the defined class
194- * @param super The new class parent
195- * @return Reference to the newly defined class
192+ * @param [mrb_state *] mrb The current mruby state.
193+ * @param [const char *] name The name of the defined class.
194+ * @param [struct RClass *] super The new class parent.
195+ * @return [struct RClass *] Reference to the newly defined class.
196196 * @see mrb_define_class_under
197197 */
198198 MRB_API struct RClass *mrb_define_class(mrb_state *mrb, const char *name, struct RClass *super);
199199
200200 /**
201201 * Defines a new module.
202- * @param mrb_state* The current mruby state.
203- * @param char* The name of the module.
204- * @return Reference to the newly defined module.
202+ * @param [mrb_state *] mrb_state* The current mruby state.
203+ * @param [const char *] char* The name of the module.
204+ * @return [struct RClass *] Reference to the newly defined module.
205205 */
206206 MRB_API struct RClass *mrb_define_module(mrb_state *, const char*);
207207 MRB_API mrb_value mrb_singleton_class(mrb_state*, mrb_value);
@@ -213,9 +213,9 @@ MRB_API mrb_value mrb_singleton_class(mrb_state*, mrb_value);
213213 * module B
214214 * include A
215215 * end
216- * @param mrb_state* The current mruby state.
217- * @param RClass* A reference to module or a class.
218- * @param RClass* A reference to the module to be included.
216+ * @param [mrb_state *] mrb_state* The current mruby state.
217+ * @param [struct RClass *] RClass* A reference to module or a class.
218+ * @param [struct RClass *] RClass* A reference to the module to be included.
219219 */
220220 MRB_API void mrb_include_module(mrb_state*, struct RClass*, struct RClass*);
221221
@@ -226,9 +226,9 @@ MRB_API void mrb_include_module(mrb_state*, struct RClass*, struct RClass*);
226226 * module B
227227 * prepend A
228228 * end
229- * @param mrb_state* The current mruby state.
230- * @param RClass* A reference to module or a class.
231- * @param RClass* A reference to the module to be prepended.
229+ * @param [mrb_state *] mrb_state* The current mruby state.
230+ * @param [struct RClass *] RClass* A reference to module or a class.
231+ * @param [struct RClass *] RClass* A reference to the module to be prepended.
232232 */
233233 MRB_API void mrb_prepend_module(mrb_state*, struct RClass*, struct RClass*);
234234
@@ -251,10 +251,11 @@ MRB_API void mrb_prepend_module(mrb_state*, struct RClass*, struct RClass*);
251251 * mrb_define_method(mrb, mrb->kernel_module, "example_method", example_method, MRB_ARGS_NONE());
252252 * }
253253 *
254- * @param mrb The MRuby state reference.
255- * @param cla The class pointer where the method will be defined.
256- * @param func The function pointer to the method definition.
257- * @param aspec The method parameters declaration.
254+ * @param [mrb_state *] mrb The MRuby state reference.
255+ * @param [struct RClass *] cla The class pointer where the method will be defined.
256+ * @param [const char *] name The name of the method being defined.
257+ * @param [mrb_func_t] func The function pointer to the method definition.
258+ * @param [mrb_aspec] aspec The method parameters declaration.
258259 */
259260 MRB_API void mrb_define_method(mrb_state *mrb, struct RClass *cla, const char *name, mrb_func_t func, mrb_aspec aspec);
260261
@@ -284,11 +285,11 @@ MRB_API void mrb_define_method(mrb_state *mrb, struct RClass *cla, const char *n
284285 * mrb_define_class_method(mrb, foo, "bar", bar_method, MRB_ARGS_NONE());
285286 *
286287 * }
287- * @param mrb_state* The MRuby state reference.
288- * @param RClass* The class where the class method will be defined.
289- * @param char* The name of the class method.
290- * @param mrb_func_t The function pointer to the class method definition.
291- * @param mrb_aspec The method parameters declaration.
288+ * @param [mrb_state *] mrb_state* The MRuby state reference.
289+ * @param [struct RClass *] RClass* The class where the class method will be defined.
290+ * @param [const char *] char* The name of the class method being defined.
291+ * @param [mrb_func_t] mrb_func_t The function pointer to the class method definition.
292+ * @param [mrb_aspec] mrb_aspec The method parameters declaration.
292293 */
293294 MRB_API void mrb_define_class_method(mrb_state *, struct RClass *, const char *, mrb_func_t, mrb_aspec);
294295 MRB_API void mrb_define_singleton_method(mrb_state*, struct RObject*, const char*, mrb_func_t, mrb_aspec);
@@ -317,11 +318,11 @@ MRB_API void mrb_define_singleton_method(mrb_state*, struct RObject*, const char
317318 * mrb_define_module_function(mrb, foo, "bar", bar_method, MRB_ARGS_NONE());
318319 *
319320 * }
320- * @param mrb_state* The MRuby state reference.
321- * @param RClass* The module where the module function will be defined.
322- * @param char* The name of the module function.
323- * @param mrb_func_t The function pointer to the module function 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 module where the module function will be defined.
323+ * @param [const char *] char* The name of the module function being defined.
324+ * @param [mrb_func_t] mrb_func_t The function pointer to the module function definition.
325+ * @param [mrb_aspec] mrb_aspec The method parameters declaration.
325326 */
326327 MRB_API void mrb_define_module_function(mrb_state*, struct RClass*, const char*, mrb_func_t, mrb_aspec);
327328
@@ -352,10 +353,10 @@ MRB_API void mrb_define_module_function(mrb_state*, struct RClass*, const char*,
352353 * mrb_example_gem_final(mrb_state* mrb){
353354 *
354355 * }
355- * @param mrb_state* The MRuby state reference.
356- * @param RClass* A class or module the constant is defined in.
357- * @param name The name of the constant.
358- * @param mrb_value The value for the constant.
356+ * @param [mrb_state *] mrb_state* The MRuby state reference.
357+ * @param [struct RClass *] RClass* A class or module the constant is defined in.
358+ * @param [const char *] name The name of the constant being defined.
359+ * @param [mrb_value] mrb_value The value for the constant.
359360 */
360361 MRB_API void mrb_define_const(mrb_state*, struct RClass*, const char *name, mrb_value);
361362
@@ -416,9 +417,9 @@ MRB_API void mrb_define_const(mrb_state*, struct RClass*, const char *name, mrb_
416417 *
417418 * }
418419 *
419- * @param mrb_state* The mruby state reference.
420- * @param RClass* A class the method will be undefined from.
421- * @param constchar* The name of the method to be undefined.
420+ * @param [mrb_state*] mrb_state* The mruby state reference.
421+ * @param [struct RClass*] RClass* A class the method will be undefined from.
422+ * @param [const char*] constchar* The name of the method to be undefined.
422423 */
423424 MRB_API void mrb_undef_method(mrb_state*, struct RClass*, const char*);
424425
@@ -465,9 +466,9 @@ MRB_API void mrb_undef_method(mrb_state*, struct RClass*, const char*);
465466 * mrb_example_gem_final(mrb_state* mrb){
466467 *
467468 * }
468- * @param mrb_state* The mruby state reference.
469- * @param RClass* A class the class method will be undefined from.
470- * @param constchar* The name of the class method to be undefined.
469+ * @param [mrb_state*] mrb_state* The mruby state reference.
470+ * @param [RClass*] RClass* A class the class method will be undefined from.
471+ * @param [constchar*] constchar* The name of the class method to be undefined.
471472 */
472473 MRB_API void mrb_undef_class_method(mrb_state*, struct RClass*, const char*);
473474
@@ -494,11 +495,11 @@ MRB_API void mrb_undef_class_method(mrb_state*, struct RClass*, const char*);
494495 * obj = mrb_obj_new(mrb, example_class, 0, NULL); # => ExampleClass.new
495496 * mrb_p(mrb, obj); // => Kernel#p
496497 * }
497- * @param mrb The current mruby state.
498- * @param c Reference to the class of the new object.
499- * @param argc Number of arguments in argv
500- * @param argv Array of mrb_value to initialize the object
501- * @return The newly initialized object
498+ * @param [mrb_state*] mrb The current mruby state.
499+ * @param [RClass*] c Reference to the class of the new object.
500+ * @param [mrb_int] argc Number of arguments in argv
501+ * @param [const mrb_value *] argv Array of mrb_value to initialize the object
502+ * @return [mrb_value] The newly initialized object
502503 */
503504 MRB_API mrb_value mrb_obj_new(mrb_state *mrb, struct RClass *c, mrb_int argc, const mrb_value *argv);
504505
@@ -525,9 +526,9 @@ MRB_API mrb_value mrb_instance_new(mrb_state *mrb, mrb_value cv);
525526 * mrb_p(mrb, obj); // => Kernel#p
526527 * }
527528 *
528- * @param mrb The current mruby state.
529- * @param super The super class or parent.
530- * @return RClass* Reference to the new class.
529+ * @param [mrb_state*] mrb The current mruby state.
530+ * @param [struct RClass *] super The super class or parent.
531+ * @return [struct RClass *] Reference to the new class.
531532 */
532533 MRB_API struct RClass * mrb_class_new(mrb_state *mrb, struct RClass *super);
533534
@@ -542,8 +543,8 @@ MRB_API struct RClass * mrb_class_new(mrb_state *mrb, struct RClass *super);
542543 * example_module = mrb_module_new(mrb);
543544 * }
544545 *
545- * @param mrb The current mruby state.
546- * @return Reference to the new module.
546+ * @param [mrb_state*] mrb The current mruby state.
547+ * @return [struct RClass *] Reference to the new module.
547548 */
548549 MRB_API struct RClass * mrb_module_new(mrb_state *mrb);
549550
@@ -569,43 +570,43 @@ MRB_API struct RClass * mrb_module_new(mrb_state *mrb);
569570 * }
570571 * }
571572 *
572- * @param mrb The current mruby state.
573- * @param *name A string representing the name of the class.
574- * @return mrb_bool A boolean value.
573+ * @param [mrb_state*] mrb The current mruby state.
574+ * @param [const char *] name A string representing the name of the class.
575+ * @return [mrb_bool] A boolean value.
575576 */
576577 MRB_API mrb_bool mrb_class_defined(mrb_state *mrb, const char *name);
577578
578579 /**
579580 * Gets a class.
580- * @param mrb The current mruby state.
581- * @param name The name of the class.
582- * @return A reference to the class.
581+ * @param [mrb_state*] mrb The current mruby state.
582+ * @param [const char *] name The name of the class.
583+ * @return [struct RClass *] A reference to the class.
583584 */
584585 MRB_API struct RClass * mrb_class_get(mrb_state *mrb, const char *name);
585586
586587 /**
587588 * Gets a child class.
588- * @param mrb The current mruby state.
589- * @param outer The name of the parent class.
590- * @param name The name of the class.
591- * @return A reference to the class.
589+ * @param [mrb_state*] mrb The current mruby state.
590+ * @param [struct RClass *] outer The name of the parent class.
591+ * @param [const char *] name The name of the class.
592+ * @return [struct RClass *] A reference to the class.
592593 */
593594 MRB_API struct RClass * mrb_class_get_under(mrb_state *mrb, struct RClass *outer, const char *name);
594595
595596 /**
596597 * Gets a module.
597- * @param mrb The current mruby state.
598- * @param name The name of the module.
599- * @return A reference to the module.
598+ * @param [mrb_state*] mrb The current mruby state.
599+ * @param [const char *] name The name of the module.
600+ * @return [struct RClass *] A reference to the module.
600601 */
601602 MRB_API struct RClass * mrb_module_get(mrb_state *mrb, const char *name);
602603
603604 /**
604605 * Gets a module defined under another module.
605- * @param mrb The current mruby state.
606- * @param outer The name of the outer module.
607- * @param name The name of the module.
608- * @return A reference to the module.
606+ * @param [mrb_state*] mrb The current mruby state.
607+ * @param [struct RClass *] outer The name of the outer module.
608+ * @param [const char *] name The name of the module.
609+ * @return [struct RClass *] A reference to the module.
609610 */
610611 MRB_API struct RClass * mrb_module_get_under(mrb_state *mrb, struct RClass *outer, const char *name);
611612 MRB_API mrb_value mrb_notimplement_m(mrb_state*, mrb_value);
@@ -615,9 +616,9 @@ MRB_API mrb_value mrb_notimplement_m(mrb_state*, mrb_value);
615616 *
616617 * Equivalent to:
617618 * Object#dup
618- * @param mrb The current mruby state.
619- * @param obj Object to be duplicate.
620- * @return The newly duplicated object.
619+ * @param [mrb_state*] mrb The current mruby state.
620+ * @param [mrb_value] obj Object to be duplicate.
621+ * @return [mrb_value] The newly duplicated object.
621622 */
622623 MRB_API mrb_value mrb_obj_dup(mrb_state *mrb, mrb_value obj);
623624 MRB_API mrb_value mrb_check_to_integer(mrb_state *mrb, mrb_value val, const char *method);
@@ -657,21 +658,21 @@ MRB_API mrb_value mrb_check_to_integer(mrb_state *mrb, mrb_value val, const char
657658 * }
658659 * }
659660 *
660- * @param mrb The current mruby state.
661- * @param c A reference to a class.
662- * @param mid A symbol referencing a method id.
663- * @return mrb_bool A boolean value.
661+ * @param [mrb_state*] mrb The current mruby state.
662+ * @param [struct RClass *] c A reference to a class.
663+ * @param [mrb_sym] mid A symbol referencing a method id.
664+ * @return [mrb_bool] A boolean value.
664665 */
665666 MRB_API mrb_bool mrb_obj_respond_to(mrb_state *mrb, struct RClass* c, mrb_sym mid);
666667
667668 /**
668669 * Defines a new class under a given module
669670 *
670- * @param mrb The current mruby state.
671- * @param outer Reference to the module under which the new class will be defined
672- * @param name The name of the defined class
673- * @param super The new class parent
674- * @return Reference to the newly defined class
671+ * @param [mrb_state*] mrb The current mruby state.
672+ * @param [struct RClass *] outer Reference to the module under which the new class will be defined
673+ * @param [const char *] name The name of the defined class
674+ * @param [struct RClass *] super The new class parent
675+ * @return [struct RClass *] Reference to the newly defined class
675676 * @see mrb_define_class
676677 */
677678 MRB_API struct RClass * mrb_define_class_under(mrb_state *mrb, struct RClass *outer, const char *name, struct RClass *super);