2010-05-08 13:34:52 -04:00
|
|
|
#ifndef _THE_RUBY_RACER_
|
|
|
|
#define _THE_RUBY_RACER_
|
|
|
|
|
|
|
|
#include <ruby.h>
|
2010-05-11 13:41:07 -04:00
|
|
|
#include <v8.h>
|
2010-05-08 13:34:52 -04:00
|
|
|
|
2010-05-10 11:16:26 -04:00
|
|
|
#define rr_define_method(klass, name, impl, argc) rb_define_method(klass, name, (VALUE(*)(...))impl, argc)
|
|
|
|
#define rr_define_singleton_method(object, name, impl, argc) rb_define_singleton_method(object, name, (VALUE(*)(...))impl, argc)
|
2010-05-08 13:34:52 -04:00
|
|
|
|
2010-05-10 08:56:52 -04:00
|
|
|
VALUE rr_define_class(const char *name, VALUE superclass = rb_cObject);
|
2010-08-06 11:24:01 -04:00
|
|
|
VALUE rr_define_module(const char *name);
|
2010-05-22 02:15:00 -04:00
|
|
|
VALUE rr_define_const(const char *name, VALUE value);
|
2011-04-11 14:32:14 -04:00
|
|
|
VALUE rr_const_get(const char *name);
|
2010-05-08 13:58:43 -04:00
|
|
|
|
2010-05-13 17:53:09 -04:00
|
|
|
VALUE rr_v82rb(v8::Handle<v8::Value> value);
|
|
|
|
VALUE rr_v82rb(v8::Handle<v8::Boolean> value);
|
|
|
|
VALUE rr_v82rb(v8::Handle<v8::Number> value);
|
|
|
|
VALUE rr_v82rb(v8::Handle<v8::String> value);
|
|
|
|
VALUE rr_v82rb(v8::Handle<v8::Object> value);
|
2010-11-08 17:23:16 -05:00
|
|
|
VALUE rr_v82rb(v8::Handle<v8::Array> value);
|
2010-05-13 17:53:09 -04:00
|
|
|
VALUE rr_v82rb(v8::Handle<v8::Function> value);
|
|
|
|
VALUE rr_v82rb(v8::Handle<v8::Integer> value);
|
|
|
|
VALUE rr_v82rb(v8::Handle<v8::Uint32> value);
|
|
|
|
VALUE rr_v82rb(v8::Handle<v8::Int32> value);
|
2010-05-18 06:27:23 -04:00
|
|
|
VALUE rr_v82rb(v8::Handle<v8::Message> value);
|
2010-11-08 17:23:16 -05:00
|
|
|
VALUE rr_v82rb(v8::Handle<v8::StackTrace> value);
|
|
|
|
VALUE rr_v82rb(v8::Handle<v8::StackFrame> value);
|
|
|
|
|
2010-05-13 17:53:09 -04:00
|
|
|
VALUE rr_v82rb(bool value);
|
|
|
|
VALUE rr_v82rb(double value);
|
|
|
|
VALUE rr_v82rb(int64_t value);
|
|
|
|
VALUE rr_v82rb(uint32_t value);
|
|
|
|
VALUE rr_v82rb(int32_t value);
|
|
|
|
|
|
|
|
v8::Handle<v8::Value> rr_rb2v8(VALUE value);
|
2010-05-11 13:41:07 -04:00
|
|
|
|
2010-06-14 11:27:01 -04:00
|
|
|
#endif
|