Skip to content

Commit dc5d366

Browse files
support string rope
1 parent 955645f commit dc5d366

3 files changed

Lines changed: 15 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# 0.15.1
2+
3+
* support string rope in bellard version
4+
15
# 0.15.0
26

37
* quickjs-ng 0.10.0

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "quickjs_runtime"
3-
version = "0.15.0"
3+
version = "0.15.1"
44
authors = ["Andries Hiemstra <andries@hiemstra-software.nl>"]
55
edition = "2021"
66
description = "Wrapper API and utils for the QuickJS JavaScript engine with support for Promise, Modules, Async/await"

src/quickjsvalueadapter.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,8 @@ impl std::fmt::Debug for QuickJsValueAdapter {
109109
TAG_INT => write!(f, "Int(?)"),
110110
TAG_FLOAT64 => write!(f, "Float(?)"),
111111
TAG_STRING => write!(f, "String(?)"),
112+
#[cfg(feature = "bellard")]
113+
TAG_STRING_ROPE => write!(f, "String(?)"),
112114
TAG_OBJECT => write!(f, "Object(?)"),
113115
TAG_MODULE => write!(f, "Module(?)"),
114116
TAG_BIG_INT => write!(f, "BigInt(?)"),
@@ -260,6 +262,10 @@ pub(crate) const TAG_BIG_INT: i64 = libquickjs_sys::JS_TAG_BIG_INT as i64;
260262
pub(crate) const TAG_SHORT_BIG_INT: i64 = libquickjs_sys::JS_TAG_SHORT_BIG_INT as i64;
261263

262264
pub(crate) const TAG_STRING: i64 = libquickjs_sys::JS_TAG_STRING as i64;
265+
266+
#[cfg(feature = "bellard")]
267+
pub(crate) const TAG_STRING_ROPE: i64 = libquickjs_sys::JS_TAG_STRING_ROPE as i64;
268+
263269
pub(crate) const TAG_MODULE: i64 = libquickjs_sys::JS_TAG_MODULE as i64;
264270
pub(crate) const TAG_FUNCTION_BYTECODE: i64 = libquickjs_sys::JS_TAG_FUNCTION_BYTECODE as i64;
265271
pub(crate) const TAG_OBJECT: i64 = libquickjs_sys::JS_TAG_OBJECT as i64;
@@ -293,6 +299,8 @@ impl QuickJsValueAdapter {
293299
TAG_INT => JsValueType::I32,
294300
TAG_FLOAT64 => JsValueType::F64,
295301
TAG_STRING => JsValueType::String,
302+
#[cfg(feature = "bellard")]
303+
TAG_STRING_ROPE => JsValueType::String,
296304
TAG_OBJECT => {
297305
// todo get classProto.name and match
298306
// if bellard, match on classid
@@ -326,6 +334,8 @@ impl QuickJsValueAdapter {
326334
match self.get_tag() {
327335
TAG_BIG_INT => "bigint",
328336
TAG_STRING => "string",
337+
#[cfg(feature = "bellard")]
338+
TAG_STRING_ROPE => "string",
329339
TAG_MODULE => "module",
330340
TAG_FUNCTION_BYTECODE => "function",
331341
TAG_OBJECT => {

0 commit comments

Comments
 (0)