raindrops RubyGem user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
blob 646f31be039608a8be87c32b0ac938ccb45d84d6 337 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
 
#include <ruby.h>
#include <ruby/io.h>

#ifdef HAVE_RB_IO_DESCRIPTOR
#	define my_fileno(io) rb_io_descriptor(io)
#else /* Ruby <3.1 */
static int my_fileno(VALUE io)
{
	rb_io_t *fptr;

	GetOpenFile(io, fptr);

	if (fptr->fd < 0)
		rb_raise(rb_eIOError, "closed stream");
	return fptr->fd;
}
#endif /* Ruby <3.1 !HAVE_RB_IO_DESCRIPTOR */

debug log:

solving 646f31b ...
found 646f31b 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).