summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author卜部昌平 <shyouhei@ruby-lang.org>2021-02-02 10:31:57 +0900
committer卜部昌平 <shyouhei@ruby-lang.org>2021-09-10 20:00:06 +0900
commit0c486c55310e5392e6773b04472404589c4ed9a0 (patch)
tree5086a4db060592b6e5d45360634dd95d4761a6c4
parentb92a9af405f6d0ce838d29496c44b5ea62c059fe (diff)
include/ruby/internal/core/rfile.h: add doxygen
Must not be a bad idea to improve documents. [ci skip]
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/4815
-rw-r--r--include/ruby/internal/core/rfile.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/ruby/internal/core/rfile.h b/include/ruby/internal/core/rfile.h
index 71699a0b7e..f8dddde9e5 100644
--- a/include/ruby/internal/core/rfile.h
+++ b/include/ruby/internal/core/rfile.h
@@ -27,10 +27,25 @@
* into ruby/ruby.h. We follow that tradition. */
struct rb_io_t;
+/**
+ * Ruby's File and IO. Ruby's IO are not just file descriptors. They have
+ * buffers. They also have encodings. Various information are controlled
+ * using this struct.
+ */
struct RFile {
+
+ /** Basic part, including flags and class. */
struct RBasic basic;
+
+ /** IO's specific fields. */
struct rb_io_t *fptr;
};
+/**
+ * Convenient casting macro.
+ *
+ * @param obj An object, which is in fact an ::RFile.
+ * @return The passed object casted to ::RFile.
+ */
#define RFILE(obj) RBIMPL_CAST((struct RFile *)(obj))
#endif /* RBIMPL_RFILE_H */