Sha256: 2baa033dfff1f94b93e8a3cdcbb2ba18debc5cb1982a6171f32afb38d9dd5177

Contents?: true

Size: 1009 Bytes

Versions: 27

Compression:

Stored size: 1009 Bytes

Contents

/*
** io.h - IO class
*/

#ifndef MRUBY_IO_H
#define MRUBY_IO_H

#if defined(__cplusplus)
extern "C" {
#endif

struct mrb_io {
  int fd;   /* file descriptor, or -1 */
  int fd2;  /* file descriptor to write if it's different from fd, or -1 */
  int pid;  /* child's pid (for pipes)  */
  unsigned int readable:1,
               writable:1,
               sync:1,
               is_socket:1;
};

#define FMODE_READABLE             0x00000001
#define FMODE_WRITABLE             0x00000002
#define FMODE_READWRITE            (FMODE_READABLE|FMODE_WRITABLE)
#define FMODE_BINMODE              0x00000004
#define FMODE_APPEND               0x00000040
#define FMODE_CREATE               0x00000080
#define FMODE_TRUNC                0x00000800

#define E_IO_ERROR                 (mrb_class_get(mrb, "IOError"))
#define E_EOF_ERROR                (mrb_class_get(mrb, "EOFError"))

mrb_value mrb_io_fileno(mrb_state *mrb, mrb_value io);

#if defined(__cplusplus)
} /* extern "C" { */
#endif
#endif /* MRUBY_IO_H */

Version data entries

27 entries across 27 versions & 2 rubygems

Version Path
script_core-0.2.1 ext/enterprise_script_service/mruby/mrbgems/mruby-io/include/mruby/ext/io.h
script_core-0.2.0 ext/enterprise_script_service/mruby/mrbgems/mruby-io/include/mruby/ext/io.h
script_core-0.1.1 ext/enterprise_script_service/mruby/mrbgems/mruby-io/include/mruby/ext/io.h
script_core-0.1.0 ext/enterprise_script_service/mruby/mrbgems/mruby-io/include/mruby/ext/io.h
script_core-0.0.6 ext/enterprise_script_service/mruby/mrbgems/mruby-io/include/mruby/ext/io.h
script_core-0.0.5 ext/enterprise_script_service/mruby/mrbgems/mruby-io/include/mruby/ext/io.h
esruby-0.2.0 resources/mruby/mrbgems/mruby-io/include/mruby/ext/io.h
esruby-0.1.5 resources/mruby/mrbgems/mruby-io/include/mruby/ext/io.h
esruby-0.1.4 resources/mruby/mrbgems/mruby-io/include/mruby/ext/io.h
esruby-0.1.3 resources/mruby/mrbgems/mruby-io/include/mruby/ext/io.h
esruby-0.1.2 resources/mruby/mrbgems/mruby-io/include/mruby/ext/io.h
esruby-0.1.1 resources/mruby/mrbgems/mruby-io/include/mruby/ext/io.h
esruby-0.1.0 resources/mruby/mrbgems/mruby-io/include/mruby/ext/io.h
esruby-0.0.11 resources/mruby/mrbgems/mruby-io/include/mruby/ext/io.h
esruby-0.0.10 resources/mruby/mrbgems/mruby-io/include/mruby/ext/io.h
esruby-0.0.9 resources/mruby/mrbgems/mruby-io/include/mruby/ext/io.h
esruby-0.0.8 resources/mruby/mrbgems/mruby-io/include/mruby/ext/io.h
esruby-0.0.7 resources/mruby/mrbgems/mruby-io/include/mruby/ext/io.h
esruby-0.0.6 resources/mruby/mrbgems/mruby-io/include/mruby/ext/io.h
esruby-0.0.5 resources/mruby/mrbgems/mruby-io/include/mruby/ext/io.h