summaryrefslogtreecommitdiff
path: root/file.c
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2023-12-06 19:56:38 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2023-12-06 19:56:38 +0900
commitca8733daaf7be388fb492e7feddfd569856686a2 (patch)
treeea31c1cb1c9aea638d28b63175178e2bc7ce554f /file.c
parentd411d8f5fe80b9c8f741ee03f91a670d5620917c (diff)
[DOC] Fixed document position
Method documentation must be placed immediately before each implementation, without any other functions or preprocessor directives.
Diffstat (limited to 'file.c')
-rw-r--r--file.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/file.c b/file.c
index 8a537c50f1..233c576283 100644
--- a/file.c
+++ b/file.c
@@ -2453,6 +2453,7 @@ rb_file_ctime(VALUE obj)
return stat_ctime(&st);
}
+#if defined(HAVE_STAT_BIRTHTIME)
/*
* call-seq:
* File.birthtime(file_name) -> time
@@ -2467,7 +2468,6 @@ rb_file_ctime(VALUE obj)
*
*/
-#if defined(HAVE_STAT_BIRTHTIME)
RUBY_FUNC_EXPORTED VALUE
rb_file_s_birthtime(VALUE klass, VALUE fname)
{
@@ -2513,16 +2513,6 @@ rb_file_birthtime(VALUE obj)
# define rb_file_birthtime rb_f_notimplement
#endif
-/*
- * call-seq:
- * file.size -> integer
- *
- * Returns the size of <i>file</i> in bytes.
- *
- * File.new("testfile").size #=> 66
- *
- */
-
rb_off_t
rb_file_size(VALUE file)
{
@@ -2546,6 +2536,16 @@ rb_file_size(VALUE file)
}
}
+/*
+ * call-seq:
+ * file.size -> integer
+ *
+ * Returns the size of <i>file</i> in bytes.
+ *
+ * File.new("testfile").size #=> 66
+ *
+ */
+
static VALUE
file_size(VALUE self)
{