mirror of
https://github.com/rubyjs/therubyracer
synced 2023-03-27 23:21:42 -04:00
move message init to v8_msg.ccp
This commit is contained in:
parent
5194b11a5b
commit
c9f299957d
3 changed files with 16 additions and 13 deletions
|
@ -37,17 +37,6 @@ extern "C" {
|
|||
rr_init_template();
|
||||
rr_init_obj();
|
||||
rr_init_func();
|
||||
|
||||
|
||||
V8_C_Message = rb_define_class_under(rb_mNative, "Message", rb_cObject);
|
||||
rb_define_method(V8_C_Message, "Get", (VALUE(*)(...))v8_Message_Get, 0);
|
||||
rb_define_method(V8_C_Message, "GetSourceLine", (VALUE(*)(...))v8_Message_GetSourceLine, 0);
|
||||
rb_define_method(V8_C_Message, "GetScriptResourceName", (VALUE(*)(...))v8_Message_GetScriptResourceName, 0);
|
||||
rb_define_method(V8_C_Message, "GetLineNumber", (VALUE(*)(...))v8_Message_GetLineNumber, 0);
|
||||
rb_define_method(V8_C_Message, "GetStartPosition", (VALUE(*)(...))v8_Message_GetStartPosition, 0);
|
||||
rb_define_method(V8_C_Message, "GetEndPosition", (VALUE(*)(...)) v8_Message_GetEndPosition, 0);
|
||||
rb_define_method(V8_C_Message, "GetStartColumn", (VALUE(*)(...)) v8_Message_GetStartColumn, 0);
|
||||
rb_define_method(V8_C_Message, "GetEndColumn", (VALUE(*)(...)) v8_Message_GetEndColumn, 0);
|
||||
|
||||
rr_init_msg();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,6 +6,18 @@ using namespace v8;
|
|||
|
||||
VALUE V8_C_Message;
|
||||
|
||||
void rr_init_msg() {
|
||||
V8_C_Message = rr_define_class("Message");
|
||||
rb_define_method(V8_C_Message, "Get", (VALUE(*)(...))v8_Message_Get, 0);
|
||||
rb_define_method(V8_C_Message, "GetSourceLine", (VALUE(*)(...))v8_Message_GetSourceLine, 0);
|
||||
rb_define_method(V8_C_Message, "GetScriptResourceName", (VALUE(*)(...))v8_Message_GetScriptResourceName, 0);
|
||||
rb_define_method(V8_C_Message, "GetLineNumber", (VALUE(*)(...))v8_Message_GetLineNumber, 0);
|
||||
rb_define_method(V8_C_Message, "GetStartPosition", (VALUE(*)(...))v8_Message_GetStartPosition, 0);
|
||||
rb_define_method(V8_C_Message, "GetEndPosition", (VALUE(*)(...)) v8_Message_GetEndPosition, 0);
|
||||
rb_define_method(V8_C_Message, "GetStartColumn", (VALUE(*)(...)) v8_Message_GetStartColumn, 0);
|
||||
rb_define_method(V8_C_Message, "GetEndColumn", (VALUE(*)(...)) v8_Message_GetEndColumn, 0);
|
||||
}
|
||||
|
||||
VALUE V8_Wrap_Message(Handle<v8::Message> msg) {
|
||||
return V8_Ref_Create(V8_C_Message, msg);
|
||||
}
|
||||
|
|
|
@ -2,9 +2,11 @@
|
|||
#define _RUBY_V8_MESSAGE_
|
||||
|
||||
#include "v8.h"
|
||||
#include "ruby.h"
|
||||
#include "rr.h"
|
||||
|
||||
extern VALUE V8_C_Message;
|
||||
void rr_init_msg();
|
||||
|
||||
VALUE V8_Wrap_Message(v8::Handle<v8::Message> msg);
|
||||
VALUE v8_Message_Get(VALUE self);
|
||||
VALUE v8_Message_GetSourceLine(VALUE self);
|
||||
|
|
Loading…
Reference in a new issue