1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

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

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60285 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
sonots 2017-10-21 14:31:21 +00:00
parent 0686d5f4eb
commit 47dd9bf7d8
3 changed files with 24 additions and 21 deletions

View file

@ -478,7 +478,7 @@ enum ruby_value_type {
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,

View file

@ -837,10 +837,10 @@ struct RIMemo {
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_type imemo_type)
#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 {
#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 {
#endif
};
/*! IFUNC (Internal FUNCtion) */
struct vm_ifunc {
VALUE flags;
VALUE reserved;
@ -938,8 +938,10 @@ typedef struct rb_imemo_alloc_struct {
size_t cnt; /* buffer size in VALUE */
} rb_imemo_alloc_t;
/* MEMO */
/*! MEMO
*
* @see imemo_type
* */
struct MEMO {
VALUE flags;
VALUE reserved;

View file

@ -37,6 +37,7 @@ typedef struct rb_scope_visi_struct {
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_t *dst, const rb_method_entry_t *src)
}
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;
#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 {