raindrops RubyGem user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
blob 4c8ffba4d63bc4f791483314e71dc2dc061522c8 272 bytes (raw)
name: ext/raindrops/my_fileno.h 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
 
#include <ruby.h>
#include <ruby/io.h>

static int my_fileno(VALUE io)
{
	rb_io_t *fptr;

	if (TYPE(io) != T_FILE)
		io = rb_convert_type(io, T_FILE, "IO", "to_io");
	GetOpenFile(io, fptr);

	if (fptr->fd < 0)
		rb_raise(rb_eIOError, "closed stream");
	return fptr->fd;
}

debug log:

solving 4c8ffba ...
found 4c8ffba in https://yhbt.net/raindrops.git/

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://yhbt.net/raindrops.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).