Implement ecma_stringbuilder_create_raw method for stringbuilder (#3584)

With this new method, we can create a stringbuilder from a raw string

JerryScript-DCO-1.0-Signed-off-by: Adam Szilagyi aszilagy@inf.u-szeged.hu
This commit is contained in:
Szilagyi Adam
2020-03-02 15:39:12 +01:00
committed by GitHub
parent ec39d08d67
commit aa17a4fa5d
6 changed files with 30 additions and 11 deletions
+2 -3
View File
@@ -295,9 +295,8 @@ static void
static_snapshot_error_unsupported_literal (snapshot_globals_t *globals_p, /**< snapshot globals */
ecma_value_t literal) /**< literal form the literal pool */
{
ecma_stringbuilder_t builder = ecma_stringbuilder_create ();
ecma_stringbuilder_append_raw (&builder, (lit_utf8_byte_t *) "Unsupported static snapshot literal: ", 37);
lit_utf8_byte_t *str_p = (lit_utf8_byte_t *) "Unsupported static snapshot literal: ";
ecma_stringbuilder_t builder = ecma_stringbuilder_create_raw (str_p, 37);
JERRY_ASSERT (!ECMA_IS_VALUE_ERROR (literal));