Project

General

Profile

Feature #8050 ยป file.c.rb_stat_new.patch

drbrain (Eric Hodel), 03/11/2013 12:31 PM

View differences:

file.c (working copy)
return TypedData_Wrap_Struct(klass, &stat_data_type, nst);
}
static VALUE
stat_new(struct stat *st)
VALUE
rb_stat_new(struct stat *st)
{
return stat_new_0(rb_cStat, st);
}
......
if (rb_stat(fname, &st) < 0) {
rb_sys_fail_path(fname);
}
return stat_new(&st);
return rb_stat_new(&st);
}
/*
......
if (fstat(fptr->fd, &st) == -1) {
rb_sys_fail_path(fptr->pathv);
}
return stat_new(&st);
return rb_stat_new(&st);
}
/*
......
if (lstat(StringValueCStr(fname), &st) == -1) {
rb_sys_fail_path(fname);
}
return stat_new(&st);
return rb_stat_new(&st);
#else
return rb_file_s_stat(klass, fname);
#endif
......
if (lstat(RSTRING_PTR(path), &st) == -1) {
rb_sys_fail_path(fptr->pathv);
}
return stat_new(&st);
return rb_stat_new(&st);
#else
return rb_io_stat(obj);
#endif
include/ruby/intern.h (working copy)
#else
# include <varargs.h>
#endif
#include <sys/stat.h>
#include "ruby/st.h"
#if defined __GNUC__ && __GNUC__ >= 4
......
VALUE rb_file_directory_p(VALUE,VALUE);
VALUE rb_str_encode_ospath(VALUE);
int rb_is_absolute_path(const char *);
VALUE rb_stat_new(struct stat *);
/* gc.c */
NORETURN(void rb_memerror(void));
int rb_during_gc(void);
    (1-1/1)