mrubyを超漢字で動作させる
Révision | 6f43e951635bf24b19868f13d18b8916e98695cc (tree) |
---|---|
l'heure | 2015-11-17 02:39:52 |
Auteur | Mav7 <battleroundscool@gmai...> |
Commiter | Mav7 |
Added type annotation to YARD.
@@ -222,19 +222,19 @@ typedef mrb_value (*mrb_func_t)(mrb_state *mrb, mrb_value); | ||
222 | 222 | * //free(TheAnimals); |
223 | 223 | * } |
224 | 224 | * |
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. | |
229 | 229 | * @see mrb_define_class_under |
230 | 230 | */ |
231 | 231 | MRB_API struct RClass *mrb_define_class(mrb_state *mrb, const char *name, struct RClass *super); |
232 | 232 | |
233 | 233 | /** |
234 | 234 | * 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. | |
238 | 238 | */ |
239 | 239 | MRB_API struct RClass *mrb_define_module(mrb_state *, const char*); |
240 | 240 | 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); | ||
246 | 246 | * module B |
247 | 247 | * include A |
248 | 248 | * 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. | |
252 | 252 | */ |
253 | 253 | MRB_API void mrb_include_module(mrb_state*, struct RClass*, struct RClass*); |
254 | 254 |
@@ -259,9 +259,9 @@ MRB_API void mrb_include_module(mrb_state*, struct RClass*, struct RClass*); | ||
259 | 259 | * module B |
260 | 260 | * prepend A |
261 | 261 | * 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. | |
265 | 265 | */ |
266 | 266 | MRB_API void mrb_prepend_module(mrb_state*, struct RClass*, struct RClass*); |
267 | 267 |
@@ -284,10 +284,11 @@ MRB_API void mrb_prepend_module(mrb_state*, struct RClass*, struct RClass*); | ||
284 | 284 | * mrb_define_method(mrb, mrb->kernel_module, "example_method", example_method, MRB_ARGS_NONE()); |
285 | 285 | * } |
286 | 286 | * |
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. | |
291 | 292 | */ |
292 | 293 | MRB_API void mrb_define_method(mrb_state *mrb, struct RClass *cla, const char *name, mrb_func_t func, mrb_aspec aspec); |
293 | 294 |
@@ -317,11 +318,11 @@ MRB_API void mrb_define_method(mrb_state *mrb, struct RClass *cla, const char *n | ||
317 | 318 | * mrb_define_class_method(mrb, foo, "bar", bar_method, MRB_ARGS_NONE()); |
318 | 319 | * |
319 | 320 | * } |
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. | |
325 | 326 | */ |
326 | 327 | MRB_API void mrb_define_class_method(mrb_state *, struct RClass *, const char *, mrb_func_t, mrb_aspec); |
327 | 328 | 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 | ||
350 | 351 | * mrb_define_module_function(mrb, foo, "bar", bar_method, MRB_ARGS_NONE()); |
351 | 352 | * |
352 | 353 | * } |
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. | |
358 | 359 | */ |
359 | 360 | MRB_API void mrb_define_module_function(mrb_state*, struct RClass*, const char*, mrb_func_t, mrb_aspec); |
360 | 361 |
@@ -385,10 +386,10 @@ MRB_API void mrb_define_module_function(mrb_state*, struct RClass*, const char*, | ||
385 | 386 | * mrb_example_gem_final(mrb_state* mrb){ |
386 | 387 | * |
387 | 388 | * } |
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. | |
392 | 393 | */ |
393 | 394 | MRB_API void mrb_define_const(mrb_state*, struct RClass*, const char *name, mrb_value); |
394 | 395 |
@@ -449,9 +450,9 @@ MRB_API void mrb_define_const(mrb_state*, struct RClass*, const char *name, mrb_ | ||
449 | 450 | * |
450 | 451 | * } |
451 | 452 | * |
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. | |
455 | 456 | */ |
456 | 457 | MRB_API void mrb_undef_method(mrb_state*, struct RClass*, const char*); |
457 | 458 |
@@ -498,9 +499,9 @@ MRB_API void mrb_undef_method(mrb_state*, struct RClass*, const char*); | ||
498 | 499 | * mrb_example_gem_final(mrb_state* mrb){ |
499 | 500 | * |
500 | 501 | * } |
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. | |
504 | 505 | */ |
505 | 506 | MRB_API void mrb_undef_class_method(mrb_state*, struct RClass*, const char*); |
506 | 507 |
@@ -527,11 +528,11 @@ MRB_API void mrb_undef_class_method(mrb_state*, struct RClass*, const char*); | ||
527 | 528 | * obj = mrb_obj_new(mrb, example_class, 0, NULL); # => ExampleClass.new |
528 | 529 | * mrb_p(mrb, obj); // => Kernel#p |
529 | 530 | * } |
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 | |
535 | 536 | */ |
536 | 537 | MRB_API mrb_value mrb_obj_new(mrb_state *mrb, struct RClass *c, mrb_int argc, const mrb_value *argv); |
537 | 538 |
@@ -558,9 +559,9 @@ MRB_API mrb_value mrb_instance_new(mrb_state *mrb, mrb_value cv); | ||
558 | 559 | * mrb_p(mrb, obj); // => Kernel#p |
559 | 560 | * } |
560 | 561 | * |
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. | |
564 | 565 | */ |
565 | 566 | MRB_API struct RClass * mrb_class_new(mrb_state *mrb, struct RClass *super); |
566 | 567 |
@@ -575,8 +576,8 @@ MRB_API struct RClass * mrb_class_new(mrb_state *mrb, struct RClass *super); | ||
575 | 576 | * example_module = mrb_module_new(mrb); |
576 | 577 | * } |
577 | 578 | * |
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. | |
580 | 581 | */ |
581 | 582 | MRB_API struct RClass * mrb_module_new(mrb_state *mrb); |
582 | 583 |
@@ -602,43 +603,43 @@ MRB_API struct RClass * mrb_module_new(mrb_state *mrb); | ||
602 | 603 | * } |
603 | 604 | * } |
604 | 605 | * |
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. | |
608 | 609 | */ |
609 | 610 | MRB_API mrb_bool mrb_class_defined(mrb_state *mrb, const char *name); |
610 | 611 | |
611 | 612 | /** |
612 | 613 | * 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. | |
616 | 617 | */ |
617 | 618 | MRB_API struct RClass * mrb_class_get(mrb_state *mrb, const char *name); |
618 | 619 | |
619 | 620 | /** |
620 | 621 | * 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. | |
625 | 626 | */ |
626 | 627 | MRB_API struct RClass * mrb_class_get_under(mrb_state *mrb, struct RClass *outer, const char *name); |
627 | 628 | |
628 | 629 | /** |
629 | 630 | * 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. | |
633 | 634 | */ |
634 | 635 | MRB_API struct RClass * mrb_module_get(mrb_state *mrb, const char *name); |
635 | 636 | |
636 | 637 | /** |
637 | 638 | * 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. | |
642 | 643 | */ |
643 | 644 | MRB_API struct RClass * mrb_module_get_under(mrb_state *mrb, struct RClass *outer, const char *name); |
644 | 645 | 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); | ||
648 | 649 | * |
649 | 650 | * Equivalent to: |
650 | 651 | * 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. | |
654 | 655 | */ |
655 | 656 | MRB_API mrb_value mrb_obj_dup(mrb_state *mrb, mrb_value obj); |
656 | 657 | 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 | ||
690 | 691 | * } |
691 | 692 | * } |
692 | 693 | * |
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. | |
697 | 698 | */ |
698 | 699 | MRB_API mrb_bool mrb_obj_respond_to(mrb_state *mrb, struct RClass* c, mrb_sym mid); |
699 | 700 | |
700 | 701 | /** |
701 | 702 | * Defines a new class under a given module |
702 | 703 | * |
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 | |
708 | 709 | * @see mrb_define_class |
709 | 710 | */ |
710 | 711 | MRB_API struct RClass * mrb_define_class_under(mrb_state *mrb, struct RClass *outer, const char *name, struct RClass *super); |