Skip to content

Commit

Permalink
* include/ruby/vm.h (ruby_vm_t): added for external interface.
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/mvm@20377 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
nobu committed Nov 27, 2008
1 parent 7d5e86c commit c5d0bec
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 18 deletions.
4 changes: 4 additions & 0 deletions ChangeLog
@@ -1,3 +1,7 @@
Thu Nov 27 16:53:36 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>

* include/ruby/vm.h (ruby_vm_t): added for external interface.

Thu Nov 27 16:32:53 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>

* signal.c (register_sigaltstack): stores alt stack for debug
Expand Down
37 changes: 19 additions & 18 deletions include/ruby/vm.h
Expand Up @@ -15,30 +15,31 @@

/* VM type declaration */
typedef struct rb_vm_struct rb_vm_t;
typedef struct rb_vm_struct ruby_vm_t;

/* core API */
rb_vm_t *ruby_vm_new(int argc, char *argv[]);
int ruby_vm_run(rb_vm_t *vm);
int ruby_vm_start(rb_vm_t *vm);
int ruby_vm_join(rb_vm_t *vm);
int ruby_vm_destruct(rb_vm_t *vm);
ruby_vm_t *ruby_vm_new(int argc, char *argv[]);
int ruby_vm_run(ruby_vm_t *vm);
int ruby_vm_start(ruby_vm_t *vm);
int ruby_vm_join(ruby_vm_t *vm);
int ruby_vm_destruct(ruby_vm_t *vm);

/* initialize API */
int ruby_vm_init_add_argv(rb_vm_t *vm, const char *arg);
int ruby_vm_init_add_library(rb_vm_t *vm, const char *lib);
int ruby_vm_init_add_library_path(rb_vm_t *vm, const char *path);
int ruby_vm_init_add_expression(rb_vm_t *vm, const char *expr);
int ruby_vm_init_script(rb_vm_t *vm, const char *script);
int ruby_vm_init_verbose(rb_vm_t *vm, int verbose_p);
int ruby_vm_init_debug(rb_vm_t *vm, int debug);
int ruby_vm_init_add_initializer(rb_vm_t *vm, void (*initializer)(rb_vm_t *));
int ruby_vm_init_stdin(rb_vm_t *vm, int fd);
int ruby_vm_init_stdout(rb_vm_t *vm, int fd);
int ruby_vm_init_stderr(rb_vm_t *vm, int fd);
int ruby_vm_init_add_argv(ruby_vm_t *vm, const char *arg);
int ruby_vm_init_add_library(ruby_vm_t *vm, const char *lib);
int ruby_vm_init_add_library_path(ruby_vm_t *vm, const char *path);
int ruby_vm_init_add_expression(ruby_vm_t *vm, const char *expr);
int ruby_vm_init_script(ruby_vm_t *vm, const char *script);
int ruby_vm_init_verbose(ruby_vm_t *vm, int verbose_p);
int ruby_vm_init_debug(ruby_vm_t *vm, int debug);
int ruby_vm_init_add_initializer(ruby_vm_t *vm, void (*initializer)(ruby_vm_t *));
int ruby_vm_init_stdin(ruby_vm_t *vm, int fd);
int ruby_vm_init_stdout(ruby_vm_t *vm, int fd);
int ruby_vm_init_stderr(ruby_vm_t *vm, int fd);

/* other API */
void ruby_vm_foreach(int (*)(rb_vm_t *, void *), void *); /* returning false stops iteration */
void *ruby_vm_specific_ptr(rb_vm_t *, int);
void ruby_vm_foreach(int (*)(ruby_vm_t *, void *), void *); /* returning false stops iteration */
void *ruby_vm_specific_ptr(ruby_vm_t *, int);


/* system level initializer */
Expand Down

0 comments on commit c5d0bec

Please sign in to comment.