goruby.c File Reference

#include "main.c"

Go to the source code of this file.

Defines

#define ruby_options   goruby_options
#define ruby_run_node   goruby_run_node

Functions

void Init_golf (void)
RUBY_EXTERN void * ruby_options (int argc, char **argv)
 Processes command line arguments and compiles the Ruby source to execute.
RUBY_EXTERN int ruby_run_node (void *)
 Runs the given compiled source and exits this process.
RUBY_EXTERN void ruby_init_ext (const char *name, void(*init)(void))
static VALUE init_golf (VALUE arg)
void * goruby_options (int argc, char **argv)
int goruby_run_node (void *arg)

Define Documentation

#define ruby_options   goruby_options

Definition at line 2 of file goruby.c.

Referenced by goruby_options(), and main().

#define ruby_run_node   goruby_run_node

Definition at line 3 of file goruby.c.

Referenced by goruby_run_node(), and main().


Function Documentation

void* goruby_options ( int  argc,
char **  argv 
)

Definition at line 28 of file goruby.c.

References dup2(), and ruby_options.

int goruby_run_node ( void *  arg  ) 

Definition at line 51 of file goruby.c.

References EXIT_FAILURE, EXIT_SUCCESS, init_golf(), NIL_P, Qtrue, rb_protect(), and ruby_run_node.

static VALUE init_golf ( VALUE  arg  )  [static]

Definition at line 21 of file goruby.c.

References Init_golf(), and ruby_init_ext().

Referenced by goruby_run_node().

void Init_golf ( void   ) 

Referenced by init_golf().

RUBY_EXTERN void ruby_init_ext ( const char *  name,
void(*)(void)  init 
)

Definition at line 1047 of file load.c.

References get_loading_table(), GET_VM, register_init_ext(), st_init_strtable(), and st_update().

Referenced by init_golf().

RUBY_EXTERN void* ruby_options ( int  argc,
char **  argv 
)

Processes command line arguments and compiles the Ruby source to execute.

This function does:

  • Processses the given command line flags and arguments for ruby(1)
  • compiles the source code from the given argument, -e or stdin, and
  • returns the compiled source as an opaque pointer to an internal data structure
Returns:
an opaque pointer to the compiled source or an internal special value.
See also:
ruby_executable_node().

Definition at line 91 of file eval.c.

References error_handle(), EXEC_TAG, GET_THREAD(), INT2FIX, POP_TAG, PUSH_TAG, rb_clear_trace_func(), ruby_init_stack(), ruby_process_options(), and SAVE_ROOT_JMPBUF.

RUBY_EXTERN int ruby_run_node ( void *  n  ) 

Runs the given compiled source and exits this process.

Return values:
0 if successfully run thhe source
non-zero if an error occurred.

Definition at line 300 of file eval.c.

References ruby_cleanup(), ruby_exec_node(), and ruby_executable_node().


Generated on 18 May 2020 for Ruby by  doxygen 1.6.1