raindrops RubyGem user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
blob 00c5d29f2dfb5eecc94720896e1db31c30a421b6 421 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
16
17
18
19
20
21
22
 
#include <ruby.h>
#include <ruby/io.h>

static int my_fileno(VALUE io)
{
#ifdef HAVE_RB_IO_DESCRIPTOR
	if (TYPE(io) != T_FILE)
		io = rb_convert_type(io, T_FILE, "IO", "to_io");

	return rb_io_descriptor(io);
#else
	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;
#endif
}

debug log:

solving 00c5d29 ...
found 00c5d29 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).