From 64ef091a64d61dc0cef4508b70e64f91e4db865d Mon Sep 17 00:00:00 2001 From: yugui Date: Wed, 11 Jul 2012 03:25:16 +0000 Subject: Reverts a half of r36079. As we discussed on ruby-dev@ and IRC, we do not need to disclose intermediate representation of program. The program embedding CRuby should use rb_eval_string family. * include/ruby/ruby.h (ruby_opaque_t): removed. (ruby_compile_main_from_file, ruby_compile_main_from_string, ruby_eval_main): removed. * eval.c (ruby_eval_main_internal): became ruby_exec_internal() again. (ruby_eval_main): removed. * ruby.c (PREPARE_PARSE_MAIN) reverted. (parse_and_compile_main, ruby_compile_main_from_file, ruby_compile_main_from_string): removed git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36362 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- include/ruby/ruby.h | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) (limited to 'include/ruby') diff --git a/include/ruby/ruby.h b/include/ruby/ruby.h index e74f65dcc4..e9474d10fa 100644 --- a/include/ruby/ruby.h +++ b/include/ruby/ruby.h @@ -1478,13 +1478,6 @@ int ruby_vsnprintf(char *str, size_t n, char const *fmt, va_list ap); * @{ */ -/*! Opaque pointer to an inner data structure. - * - * You do not have to know what the actual data type this pointer points. - * It often changes for internal improvements. - */ -typedef void *ruby_opaque_t; - /** @defgroup ruby1 ruby(1) implementation * A part of the implementation of ruby(1) command. * Other programs that embed Ruby interpreter do not always need to use these @@ -1494,9 +1487,9 @@ typedef void *ruby_opaque_t; void ruby_sysinit(int *argc, char ***argv); void ruby_init(void); -ruby_opaque_t ruby_options(int argc, char** argv); -int ruby_executable_node(ruby_opaque_t n, int *status); -int ruby_run_node(ruby_opaque_t n); +void* ruby_options(int argc, char** argv); +int ruby_executable_node(void *n, int *status); +int ruby_run_node(void *n); /* version.c */ void ruby_show_version(void); @@ -1528,10 +1521,7 @@ void ruby_set_stack_size(size_t); int ruby_stack_check(void); size_t ruby_stack_length(VALUE**); -ruby_opaque_t ruby_compile_main_from_file(VALUE fname, const char* path, VALUE* error); -ruby_opaque_t ruby_compile_main_from_string(VALUE fname, VALUE string, VALUE* error); -int ruby_exec_node(ruby_opaque_t n); -int ruby_eval_main(ruby_opaque_t n, VALUE *result); +int ruby_exec_node(void *n); void ruby_script(const char* name); void ruby_set_script_name(VALUE name); -- cgit v1.2.3