Sha256: 28f9f041f738c20e1706e7d14ce5a39b6a638de440a0ee5501eb2fc2359c1b38

Contents?: true

Size: 711 Bytes

Versions: 13

Compression:

Stored size: 711 Bytes

Contents

/* We do not modify RSTRING in this file, so RSTRING_MODIFIED is not needed */
#if defined(HAVE_RB_IO_T) && \
    defined(HAVE_TYPE_STRUCT_RFILE) && \
    defined(HAVE_ST_PATHV)
/* MRI 1.9 */
static void set_file_path(VALUE io, VALUE path)
{
	rb_io_t *fptr = RFILE(io)->fptr;
	fptr->pathv = rb_str_new4(path);
}
#elif defined(HAVE_TYPE_OPENFILE) && \
      defined(HAVE_TYPE_STRUCT_RFILE) && \
      defined(HAVE_ST_PATH)
/* MRI 1.8 */
#include "util.h"
static void set_file_path(VALUE io, VALUE path)
{
	OpenFile *fptr = RFILE(io)->fptr;
	fptr->path = ruby_strdup(RSTRING_PTR(path));
}
#else
/* Rubinius */
static void set_file_path(VALUE io, VALUE path)
{
	rb_iv_set(io, "@path", rb_str_new4(path));
}
#endif

Version data entries

13 entries across 13 versions & 2 rubygems

Version Path
kgio-2.11.4 ext/kgio/set_file_path.h
kgio-2.11.3 ext/kgio/set_file_path.h
kgio-2.11.2 ext/kgio/set_file_path.h
kgio-2.11.1.1.g36ea ext/kgio/set_file_path.h
kgio-2.11.1 ext/kgio/set_file_path.h
kgio-2.11.0 ext/kgio/set_file_path.h
ish_lib_manager-0.0.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/kgio-2.10.0/ext/kgio/set_file_path.h
kgio-2.10.0 ext/kgio/set_file_path.h
kgio-2.9.3 ext/kgio/set_file_path.h
kgio-2.9.2 ext/kgio/set_file_path.h
kgio-2.9.1 ext/kgio/set_file_path.h
kgio-2.9.0.2.gf33a ext/kgio/set_file_path.h
kgio-2.9.0 ext/kgio/set_file_path.h