ruby-changes:48171
From: sonots <ko1@a...>
Date: Sat, 21 Oct 2017 23:31:28 +0900 (JST)
Subject: [ruby-changes:48171] sonots:r60285 (trunk): Add doxygen comments
sonots 2017-10-21 23:31:21 +0900 (Sat, 21 Oct 2017) New Revision: 60285 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=60285 Log: Add doxygen comments * include/ruby/ruby.h (enum ruby_value_type): add doxygen comments * internal.h (enum imemo_type, struct vm_svar): add doxygen comments * method.h (rb_method_type_t, rb_method_iseq_t): add doxygen comments Modified files: trunk/include/ruby/ruby.h trunk/internal.h trunk/method.h Index: include/ruby/ruby.h =================================================================== --- include/ruby/ruby.h (revision 60284) +++ include/ruby/ruby.h (revision 60285) @@ -478,7 +478,7 @@ enum ruby_value_type { https://github.com/ruby/ruby/blob/trunk/include/ruby/ruby.h#L478 RUBY_T_FIXNUM = 0x15, RUBY_T_UNDEF = 0x16, - RUBY_T_IMEMO = 0x1a, + RUBY_T_IMEMO = 0x1a, /*!< @see imemo_type */ RUBY_T_NODE = 0x1b, RUBY_T_ICLASS = 0x1c, RUBY_T_ZOMBIE = 0x1d, Index: internal.h =================================================================== --- internal.h (revision 60284) +++ internal.h (revision 60285) @@ -837,10 +837,10 @@ struct RIMemo { https://github.com/ruby/ruby/blob/trunk/internal.h#L837 enum imemo_type { imemo_env = 0, - imemo_cref = 1, - imemo_svar = 2, + imemo_cref = 1, /*!< class reference */ + imemo_svar = 2, /*!< special variable */ imemo_throw_data = 3, - imemo_ifunc = 4, + imemo_ifunc = 4, /*!< iterator function */ imemo_memo = 5, imemo_ment = 6, imemo_iseq = 7, @@ -877,22 +877,21 @@ imemo_type_p(VALUE imemo, enum imemo_typ https://github.com/ruby/ruby/blob/trunk/internal.h#L877 #define IMEMO_FL_USER3 FL_USER7 #define IMEMO_FL_USER4 FL_USER8 -/* CREF in method.h */ - -/* SVAR */ +/* CREF (Class REFerence) is defined in method.h */ +/*! SVAR (Special VARiable) */ struct vm_svar { VALUE flags; - const VALUE cref_or_me; + const VALUE cref_or_me; /*!< class reference or rb_method_entry_t */ const VALUE lastline; const VALUE backref; const VALUE others; }; -/* THROW_DATA */ #define THROW_DATA_CONSUMED IMEMO_FL_USER0 +/*! THROW_DATA */ struct vm_throw_data { VALUE flags; VALUE reserved; @@ -903,7 +902,7 @@ struct vm_throw_data { https://github.com/ruby/ruby/blob/trunk/internal.h#L902 #define THROW_DATA_P(err) RB_TYPE_P((VALUE)(err), T_IMEMO) -/* IFUNC */ +/* IFUNC (Internal FUNCtion) */ struct vm_ifunc_argc { #if SIZEOF_INT * 2 > SIZEOF_VALUE @@ -914,6 +913,7 @@ struct vm_ifunc_argc { https://github.com/ruby/ruby/blob/trunk/internal.h#L913 #endif }; +/*! IFUNC (Internal FUNCtion) */ struct vm_ifunc { VALUE flags; VALUE reserved; @@ -938,8 +938,10 @@ typedef struct rb_imemo_alloc_struct { https://github.com/ruby/ruby/blob/trunk/internal.h#L938 size_t cnt; /* buffer size in VALUE */ } rb_imemo_alloc_t; -/* MEMO */ - +/*! MEMO + * + * @see imemo_type + * */ struct MEMO { VALUE flags; VALUE reserved; Index: method.h =================================================================== --- method.h (revision 60284) +++ method.h (revision 60285) @@ -37,6 +37,7 @@ typedef struct rb_scope_visi_struct { https://github.com/ruby/ruby/blob/trunk/method.h#L37 unsigned int module_func : 1; } rb_scope_visibility_t; +/*! CREF (Class REFerence) */ typedef struct rb_cref_struct { VALUE flags; const VALUE refinements; @@ -98,18 +99,18 @@ METHOD_ENTRY_FLAGS_COPY(rb_method_entry_ https://github.com/ruby/ruby/blob/trunk/method.h#L99 } typedef enum { - VM_METHOD_TYPE_ISEQ, - VM_METHOD_TYPE_CFUNC, - VM_METHOD_TYPE_ATTRSET, - VM_METHOD_TYPE_IVAR, + VM_METHOD_TYPE_ISEQ, /*!< Ruby method */ + VM_METHOD_TYPE_CFUNC, /*!< C method */ + VM_METHOD_TYPE_ATTRSET, /*!< attr_writer or attr_accessor */ + VM_METHOD_TYPE_IVAR, /*!< attr_reader or attr_accessor */ VM_METHOD_TYPE_BMETHOD, VM_METHOD_TYPE_ZSUPER, VM_METHOD_TYPE_ALIAS, VM_METHOD_TYPE_UNDEF, VM_METHOD_TYPE_NOTIMPLEMENTED, - VM_METHOD_TYPE_OPTIMIZED, /* Kernel#send, Proc#call, etc */ - VM_METHOD_TYPE_MISSING, /* wrapper for method_missing(id) */ - VM_METHOD_TYPE_REFINED, + VM_METHOD_TYPE_OPTIMIZED, /*!< Kernel#send, Proc#call, etc */ + VM_METHOD_TYPE_MISSING, /*!< wrapper for method_missing(id) */ + VM_METHOD_TYPE_REFINED, /*!< refinement */ END_OF_ENUMERATION(VM_METHOD_TYPE) } rb_method_type_t; @@ -120,8 +121,8 @@ typedef struct rb_iseq_struct rb_iseq_t; https://github.com/ruby/ruby/blob/trunk/method.h#L121 #endif typedef struct rb_method_iseq_struct { - const rb_iseq_t * const iseqptr; /* should be separated from iseqval */ - rb_cref_t * const cref; /* should be marked */ + const rb_iseq_t * const iseqptr; /*!< iseq pointer, should be separated from iseqval */ + rb_cref_t * const cref; /*!< class reference, should be marked */ } rb_method_iseq_t; /* check rb_add_method_iseq() when modify the fields */ typedef struct rb_method_cfunc_struct { -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/