Skip to content

Commit

Permalink
feat: Update std::string
Browse files Browse the repository at this point in the history
  • Loading branch information
Pd233 committed Aug 5, 2023
1 parent ff47fe2 commit dd70a67
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/native.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ void std_string_placement_new_default(void* where) { new (where) std::string; }
void std_string_placement_new_c_style_str(void* where, char* str) {
new (where) std::string(str);
}
void std_string_placement_new_copy(void* where, std::string* str) {
new (where) std::string(*str);
}
void std_string_placement_new_move(void* where, std::string* str) {
new (where) std::string(std::move(*str));
}
void std_string_destructor(std::string* str) { str->~basic_string(); }

std::string* std_string_new() { return new std::string(); }
Expand Down

0 comments on commit dd70a67

Please sign in to comment.