Permalink
Browse files

Added wrapper for string_new.

  • Loading branch information...
1 parent b60414c commit ebe8d450e71e80c42d22ac881fe58adb3217a959 @whitequark committed May 19, 2011
Showing with 9 additions and 2 deletions.
  1. +6 −1 libcoldruby/ColdRuby.cpp
  2. +3 −1 libcoldruby/ColdRuby.h
View
@@ -468,6 +468,11 @@ Local<Object> ColdRuby::to_block(Handle<Object> value) {
RETURN_CHECK_TYPE(to_block, Object);
}
-void ColdRuby::rubyDisposed(v8::Persistent<v8::Value> object, void *arg) {
+Local<Object> ColdRuby::string_new(Handle<String> value) {
+ DO_RUBY_CALL(string_new, 1, value);
+ RETURN_CHECK_TYPE(string_new, Object);
+}
+
+void ColdRuby::rubyDisposed(v8::Persistent<v8::Value> object, void *arg) {
delete static_cast<ColdRuby *>(arg);
}
View
@@ -114,9 +114,11 @@ class ColdRuby {
v8::Local<v8::Object> to_float(v8::Handle<v8::Object> value);
v8::Local<v8::Object> to_block(v8::Handle<v8::Object> value);
+ v8::Local<v8::Object> string_new(v8::Handle<v8::String> value);
+
private:
static void rubyDisposed(v8::Persistent<v8::Value> object, void *arg);
-
+
void setErrorString(const std::string &string);
ColdRubyVM *m_vm;

0 comments on commit ebe8d45

Please sign in to comment.