Skip to content

Commit

Permalink
add too binding.cc
Browse files Browse the repository at this point in the history
  • Loading branch information
crowlKats committed Jan 2, 2025
1 parent 9ddf989 commit 1e0c12a
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/binding.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2367,6 +2367,24 @@ bool v8__PropertyCallbackInfo__ShouldThrowOnError(
return self.ShouldThrowOnError();
}

const v8::RegExp* v8__RegExp__new(const v8::Context& context,
const v8::String& pattern,
int options) {
return maybe_local_to_ptr(v8::RegExp::New(
ptr_to_local(&context), ptr_to_local(&pattern), options));
}

const v8::Object* v8__RegExp__Exec(const v8::RegExp& self,
const v8::Context& context,
const v8::String& subject) {
return maybe_local_to_ptr(self.Exec(
ptr_to_local(&context), ptr_to_local(&subject)));
}

const v8::String* v8__RegExp__GetSource(const v8::RegExp& self) {
return local_to_ptr(self.get_source());
}

void v8__ReturnValue__Value__Set(v8::ReturnValue<v8::Value>* self,
const v8::Value& value) {
self->Set(ptr_to_local(&value));
Expand Down

0 comments on commit 1e0c12a

Please sign in to comment.