How to get a writable FILE* from RFile in Ruby 1.9.1?

B

bbr322

rb_io_t *fptr;

Check_Type(f, T_FILE);
rb_io_binmode(f);
GetOpenFile(f, fptr);
rb_io_check_writable(fptr);
fprintf(rb_io_stdio_file(fptr), pstr);
 
R

Roger Pack

bbr322 said:
rb_io_t *fptr;

Check_Type(f, T_FILE);
rb_io_binmode(f);
GetOpenFile(f, fptr);
rb_io_check_writable(fptr);
fprintf(rb_io_stdio_file(fptr), pstr);

is that a question or an answer? :)
-=r
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,176
Messages
2,570,949
Members
47,500
Latest member
ArianneJsb

Latest Threads

Top