mirror of
https://github.com/openharmony/third_party_quickjs.git
synced 2026-07-18 21:04:31 -04:00
!20 Add Quick for NAPI deps.
Merge pull request !20 from zhongjianfei/br0902
This commit is contained in:
@@ -43,6 +43,7 @@ config("qjs_debug_config") {
|
||||
|
||||
qjs_sources = [
|
||||
"cutils.c",
|
||||
"libbf.c",
|
||||
"libregexp.c",
|
||||
"libunicode.c",
|
||||
"quickjs-libc.c",
|
||||
@@ -76,6 +77,7 @@ ohos_static_library("qjs") {
|
||||
ohos_executable("qjsc") {
|
||||
sources = [
|
||||
"cutils.c",
|
||||
"libbf.c",
|
||||
"libregexp.c",
|
||||
"libunicode.c",
|
||||
"qjsc.c",
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
* QuickJS Javascript Engine
|
||||
*
|
||||
* Copyright (c) 2017-2020 Fabrice Bellard
|
||||
* Copyright (c) 2017-2020 Charlie Gordon
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
#ifndef CONFIG_H
|
||||
#define CONFIG_H
|
||||
|
||||
#define CONFIG_BIGNUM 1
|
||||
|
||||
#endif /* CONFIG_H */
|
||||
@@ -38,6 +38,7 @@
|
||||
#include <malloc.h>
|
||||
#endif
|
||||
|
||||
#include "config.h"
|
||||
#include "cutils.h"
|
||||
#include "quickjs-libc.h"
|
||||
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
#include <malloc.h>
|
||||
#endif
|
||||
|
||||
#include "config.h"
|
||||
#include "cutils.h"
|
||||
#include "list.h"
|
||||
#include "quickjs.h"
|
||||
@@ -54541,3 +54542,8 @@ JSValue JS_AceNewInstance(JSContext *ctx, int classId, int argc, JSValueConst *a
|
||||
JS_FreeValue(ctx, obj);
|
||||
return newInst;
|
||||
}
|
||||
|
||||
JSValue JS_NewString16(JSContext *ctx, const uint16_t *buf, int len)
|
||||
{
|
||||
return js_new_string16(ctx, buf, len);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user