Project

General

Profile

Feature #8050

struct stat to VALUE should be accessable from the C-API

Added by Hanmac (Hans Mackowiak) over 6 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Normal
Target version:
[ruby-core:53225]

Description

filc.c has methods to turn an struct stat into an File::Stat, the problem is that this methods are not accessable from the outside, and cant me mimiced my coping into the c-Ext code.

so it would be good if there where a VALUE rb_stat_new(stuct stat); or something like that for the C-API


Files

file.c.rb_stat_new.patch (1.83 KB) file.c.rb_stat_new.patch drbrain (Eric Hodel), 03/11/2013 12:31 PM

Associated revisions

Revision c07c33b2
Added by nobu (Nobuyoshi Nakada) about 6 years ago

file.c: export rb_stat_new

  • file.c (stat_new_0): constify.
  • file.c (rb_stat_new): constify and export. based on a patch by Hanmac (Hans Mackowiak) at [ruby-core:53225]. [Feature #8050]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43107 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 43107
Added by nobu (Nobuyoshi Nakada) about 6 years ago

file.c: export rb_stat_new

  • file.c (stat_new_0): constify.
  • file.c (rb_stat_new): constify and export. based on a patch by Hanmac (Hans Mackowiak) at [ruby-core:53225]. [Feature #8050]

Revision 43107
Added by nobu (Nobuyoshi Nakada) about 6 years ago

file.c: export rb_stat_new

  • file.c (stat_new_0): constify.
  • file.c (rb_stat_new): constify and export. based on a patch by Hanmac (Hans Mackowiak) at [ruby-core:53225]. [Feature #8050]

Revision 43107
Added by nobu (Nobuyoshi Nakada) about 6 years ago

file.c: export rb_stat_new

  • file.c (stat_new_0): constify.
  • file.c (rb_stat_new): constify and export. based on a patch by Hanmac (Hans Mackowiak) at [ruby-core:53225]. [Feature #8050]

Revision 43107
Added by nobu (Nobuyoshi Nakada) about 6 years ago

file.c: export rb_stat_new

  • file.c (stat_new_0): constify.
  • file.c (rb_stat_new): constify and export. based on a patch by Hanmac (Hans Mackowiak) at [ruby-core:53225]. [Feature #8050]

Revision 43107
Added by nobu (Nobuyoshi Nakada) about 6 years ago

file.c: export rb_stat_new

  • file.c (stat_new_0): constify.
  • file.c (rb_stat_new): constify and export. based on a patch by Hanmac (Hans Mackowiak) at [ruby-core:53225]. [Feature #8050]

Revision 43107
Added by nobu (Nobuyoshi Nakada) about 6 years ago

file.c: export rb_stat_new

  • file.c (stat_new_0): constify.
  • file.c (rb_stat_new): constify and export. based on a patch by Hanmac (Hans Mackowiak) at [ruby-core:53225]. [Feature #8050]

Revision 85ab5379
Added by nobu (Nobuyoshi Nakada) about 6 years ago

file/stat.c: fix commit miss

  • ext/-test-/file/stat.c: extension library to test [Feature #8050].

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43108 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 43108
Added by nobu (Nobuyoshi Nakada) about 6 years ago

file/stat.c: fix commit miss

  • ext/-test-/file/stat.c: extension library to test [Feature #8050].

Revision 43108
Added by nobu (Nobuyoshi Nakada) about 6 years ago

file/stat.c: fix commit miss

  • ext/-test-/file/stat.c: extension library to test [Feature #8050].

Revision 43108
Added by nobu (Nobuyoshi Nakada) about 6 years ago

file/stat.c: fix commit miss

  • ext/-test-/file/stat.c: extension library to test [Feature #8050].

Revision 43108
Added by nobu (Nobuyoshi Nakada) about 6 years ago

file/stat.c: fix commit miss

  • ext/-test-/file/stat.c: extension library to test [Feature #8050].

Revision 43108
Added by nobu (Nobuyoshi Nakada) about 6 years ago

file/stat.c: fix commit miss

  • ext/-test-/file/stat.c: extension library to test [Feature #8050].

Revision 43108
Added by nobu (Nobuyoshi Nakada) about 6 years ago

file/stat.c: fix commit miss

  • ext/-test-/file/stat.c: extension library to test [Feature #8050].

History

Updated by drbrain (Eric Hodel) over 6 years ago

This patch seems to implement the feature.

Updated by nobu (Nobuyoshi Nakada) over 6 years ago

vote for ruby/io.h.

Updated by andrenth (Andre Nathan) over 6 years ago

Can we also have a way to create a Dir object from a DIR pointer? Something like rb_dir_new(DIR *dir).

Updated by drbrain (Eric Hodel) over 6 years ago

Please open separate feature request for DIR * -> Dir

Updated by naruse (Yui NARUSE) about 6 years ago

  • Assignee changed from matz (Yukihiro Matsumoto) to nobu (Nobuyoshi Nakada)

this is nobu's issue because this is C API.

#7

Updated by nobu (Nobuyoshi Nakada) about 6 years ago

  • Status changed from Assigned to Closed
  • % Done changed from 0 to 100

This issue was solved with changeset r43107.
Hans, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


file.c: export rb_stat_new

  • file.c (stat_new_0): constify.
  • file.c (rb_stat_new): constify and export. based on a patch by Hanmac (Hans Mackowiak) at [ruby-core:53225]. [Feature #8050]

Also available in: Atom PDF