From: matz@... (Yukihiro Matsumoto) Date: 2001-03-16T12:11:44+09:00 Subject: [ruby-talk:12707] Re: RCR: Public C APIs for accessing File objects Hi, In message "[ruby-talk:12702] RCR: Public C APIs for accessing File objects" on 01/03/16, "Lyle Johnson" writes: |Since there was no response to my question a few days back I'm assuming that |there is no officially approved way for C/C++ extension code to get at the |FILE* pointer(s) embedded in a Ruby file object. So consider this an |official request for the same ;) It's OK for you to use the stuffs from . #include "ruby.h" #include "rubyio.h" foo(VALUE obj) { OpenFile *fptr; FILE *f; Check_Type(obj, T_FILE); GetOpenFile(obj, fptr); rb_io_check_readable(fptr); f = GetReadFile(fptr); .... } matz.