Ruby  3.4.0dev (2024-11-22 revision 0989400a925cd201defdca9eb28eb87200b30785)
Macros | Enumerations | Functions | Variables
buffer.h File Reference

(0989400a925cd201defdca9eb28eb87200b30785)

#include "ruby/ruby.h"
#include "ruby/internal/config.h"
Include dependency graph for buffer.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define RB_IO_BUFFER_EXPERIMENTAL   1
 
#define RUBY_IO_BUFFER_VERSION   2
 

Enumerations

enum  rb_io_buffer_flags {
  RB_IO_BUFFER_EXTERNAL = 1 , RB_IO_BUFFER_INTERNAL = 2 , RB_IO_BUFFER_MAPPED = 4 , RB_IO_BUFFER_SHARED = 8 ,
  RB_IO_BUFFER_LOCKED = 32 , RB_IO_BUFFER_PRIVATE = 64 , RB_IO_BUFFER_READONLY = 128 , RB_IO_BUFFER_FILE = 256
}
 
enum  rb_io_buffer_endian { RB_IO_BUFFER_LITTLE_ENDIAN = 4 , RB_IO_BUFFER_BIG_ENDIAN = 8 , RB_IO_BUFFER_HOST_ENDIAN = RB_IO_BUFFER_LITTLE_ENDIAN , RB_IO_BUFFER_NETWORK_ENDIAN = RB_IO_BUFFER_BIG_ENDIAN }
 

Functions

VALUE rb_io_buffer_new (void *base, size_t size, enum rb_io_buffer_flags flags)
 
VALUE rb_io_buffer_map (VALUE io, size_t size, rb_off_t offset, enum rb_io_buffer_flags flags)
 
VALUE rb_io_buffer_lock (VALUE self)
 
VALUE rb_io_buffer_unlock (VALUE self)
 
int rb_io_buffer_try_unlock (VALUE self)
 
VALUE rb_io_buffer_free (VALUE self)
 
VALUE rb_io_buffer_free_locked (VALUE self)
 
enum rb_io_buffer_flags rb_io_buffer_get_bytes (VALUE self, void **base, size_t *size)
 
void rb_io_buffer_get_bytes_for_reading (VALUE self, const void **base, size_t *size)
 
void rb_io_buffer_get_bytes_for_writing (VALUE self, void **base, size_t *size)
 
VALUE rb_io_buffer_transfer (VALUE self)
 
void rb_io_buffer_resize (VALUE self, size_t size)
 
void rb_io_buffer_clear (VALUE self, uint8_t value, size_t offset, size_t length)
 
VALUE rb_io_buffer_read (VALUE self, VALUE io, size_t length, size_t offset)
 
VALUE rb_io_buffer_pread (VALUE self, VALUE io, rb_off_t from, size_t length, size_t offset)
 
VALUE rb_io_buffer_write (VALUE self, VALUE io, size_t length, size_t offset)
 
VALUE rb_io_buffer_pwrite (VALUE self, VALUE io, rb_off_t from, size_t length, size_t offset)
 

Variables

VALUE rb_cIOBuffer
 
size_t RUBY_IO_BUFFER_PAGE_SIZE
 
size_t RUBY_IO_BUFFER_DEFAULT_SIZE
 

Detailed Description

Author
Samuel Williams
Date
Fri 2 Jul 2021 16:29:01 NZST

Definition in file buffer.h.