Ruby  2.4.2p198(2017-09-14revision59899)
Functions | Variables
psych_emitter.c File Reference
#include <psych.h>
Include dependency graph for psych_emitter.c:

Go to the source code of this file.

Functions

static void emit (yaml_emitter_t *emitter, yaml_event_t *event)
 
static int writer (void *ctx, unsigned char *buffer, size_t size)
 
static void dealloc (void *ptr)
 
static VALUE allocate (VALUE klass)
 
static VALUE initialize (int argc, VALUE *argv, VALUE self)
 
static VALUE start_stream (VALUE self, VALUE encoding)
 
static VALUE end_stream (VALUE self)
 
static VALUE start_document (VALUE self, VALUE version, VALUE tags, VALUE imp)
 
static VALUE end_document (VALUE self, VALUE imp)
 
static VALUE scalar (VALUE self, VALUE value, VALUE anchor, VALUE tag, VALUE plain, VALUE quoted, VALUE style)
 
static VALUE start_sequence (VALUE self, VALUE anchor, VALUE tag, VALUE implicit, VALUE style)
 
static VALUE end_sequence (VALUE self)
 
static VALUE start_mapping (VALUE self, VALUE anchor, VALUE tag, VALUE implicit, VALUE style)
 
static VALUE end_mapping (VALUE self)
 
static VALUE alias (VALUE self, VALUE anchor)
 
static VALUE set_canonical (VALUE self, VALUE style)
 
static VALUE canonical (VALUE self)
 
static VALUE set_indentation (VALUE self, VALUE level)
 
static VALUE indentation (VALUE self)
 
static VALUE line_width (VALUE self)
 
static VALUE set_line_width (VALUE self, VALUE width)
 
void Init_psych_emitter (void)
 

Variables

VALUE cPsychEmitter
 
static ID id_io
 
static ID id_write
 
static ID id_line_width
 
static ID id_indentation
 
static ID id_canonical
 
static const rb_data_type_t psych_emitter_type
 

Function Documentation

◆ alias()

static VALUE alias ( VALUE  self,
VALUE  anchor 
)
static

◆ allocate()

static VALUE allocate ( VALUE  klass)
static

◆ canonical()

static VALUE canonical ( VALUE  self)
static

◆ dealloc()

static void dealloc ( void *  ptr)
static

Definition at line 31 of file psych_emitter.c.

References xfree(), and yaml_emitter_delete().

◆ emit()

static void emit ( yaml_emitter_t emitter,
yaml_event_t event 
)
static

◆ end_document()

static VALUE end_document ( VALUE  self,
VALUE  imp 
)
static

Definition at line 223 of file psych_emitter.c.

References emit(), TypedData_Get_Struct, and yaml_document_end_event_initialize().

Referenced by Init_psych_emitter().

◆ end_mapping()

static VALUE end_mapping ( VALUE  self)
static

Definition at line 403 of file psych_emitter.c.

References emit(), TypedData_Get_Struct, and yaml_mapping_end_event_initialize().

Referenced by Init_psych_emitter().

◆ end_sequence()

static VALUE end_sequence ( VALUE  self)
static

Definition at line 339 of file psych_emitter.c.

References emit(), TypedData_Get_Struct, and yaml_sequence_end_event_initialize().

Referenced by Init_psych_emitter().

◆ end_stream()

static VALUE end_stream ( VALUE  self)
static

Definition at line 126 of file psych_emitter.c.

References emit(), TypedData_Get_Struct, and yaml_stream_end_event_initialize().

Referenced by Init_psych_emitter().

◆ indentation()

static VALUE indentation ( VALUE  self)
static

Definition at line 488 of file psych_emitter.c.

References yaml_emitter_s::best_indent, INT2NUM, and TypedData_Get_Struct.

Referenced by Init_psych_emitter().

◆ Init_psych_emitter()

void Init_psych_emitter ( void  )

◆ initialize()

static VALUE initialize ( int  argc,
VALUE argv,
VALUE  self 
)
static

◆ line_width()

static VALUE line_width ( VALUE  self)
static

Definition at line 500 of file psych_emitter.c.

References yaml_emitter_s::best_width, INT2NUM, and TypedData_Get_Struct.

Referenced by Init_psych_emitter(), and initialize().

◆ scalar()

static VALUE scalar ( VALUE  self,
VALUE  value,
VALUE  anchor,
VALUE  tag,
VALUE  plain,
VALUE  quoted,
VALUE  style 
)
static

◆ set_canonical()

static VALUE set_canonical ( VALUE  self,
VALUE  style 
)
static

Definition at line 447 of file psych_emitter.c.

References Qtrue, TypedData_Get_Struct, and yaml_emitter_set_canonical().

Referenced by Init_psych_emitter().

◆ set_indentation()

static VALUE set_indentation ( VALUE  self,
VALUE  level 
)
static

Definition at line 474 of file psych_emitter.c.

References level, NUM2INT, TypedData_Get_Struct, and yaml_emitter_set_indent().

Referenced by Init_psych_emitter().

◆ set_line_width()

static VALUE set_line_width ( VALUE  self,
VALUE  width 
)
static

Definition at line 512 of file psych_emitter.c.

References NUM2INT, TypedData_Get_Struct, and yaml_emitter_set_width().

Referenced by Init_psych_emitter().

◆ start_document()

static VALUE start_document ( VALUE  self,
VALUE  version,
VALUE  tags,
VALUE  imp 
)
static

◆ start_mapping()

static VALUE start_mapping ( VALUE  self,
VALUE  anchor,
VALUE  tag,
VALUE  implicit,
VALUE  style 
)
static

◆ start_sequence()

static VALUE start_sequence ( VALUE  self,
VALUE  anchor,
VALUE  tag,
VALUE  implicit,
VALUE  style 
)
static

◆ start_stream()

static VALUE start_stream ( VALUE  self,
VALUE  encoding 
)
static

◆ writer()

static int writer ( void *  ctx,
unsigned char *  buffer,
size_t  size 
)
static

Definition at line 23 of file psych_emitter.c.

References id_io, id_write, NUM2INT, rb_attr_get(), rb_enc_str_new(), rb_funcall(), and rb_utf8_encoding().

Referenced by initialize().

Variable Documentation

◆ cPsychEmitter

VALUE cPsychEmitter

Definition at line 10 of file psych_emitter.c.

Referenced by Init_psych_emitter().

◆ id_canonical

ID id_canonical
static

Definition at line 15 of file psych_emitter.c.

Referenced by Init_psych_emitter(), and initialize().

◆ id_indentation

ID id_indentation
static

Definition at line 14 of file psych_emitter.c.

Referenced by Init_psych_emitter(), and initialize().

◆ id_io

ID id_io
static

Definition at line 11 of file psych_emitter.c.

Referenced by Init_psych_emitter(), initialize(), and writer().

◆ id_line_width

ID id_line_width
static

Definition at line 13 of file psych_emitter.c.

Referenced by Init_psych_emitter(), and initialize().

◆ id_write

ID id_write
static

Definition at line 12 of file psych_emitter.c.

Referenced by Init_psych_emitter(), and writer().

◆ psych_emitter_type

const rb_data_type_t psych_emitter_type
static
Initial value:
= {
"Psych/emitter",
{0, dealloc, 0,},
0, 0,
}
#define RUBY_TYPED_FREE_IMMEDIATELY
Definition: ruby.h:1145
static void dealloc(void *ptr)
Definition: psych_emitter.c:31

Definition at line 49 of file psych_emitter.c.