Skip to content

Commit 7b128b2

Browse files
committed
fix build issue
1 parent 37b0d85 commit 7b128b2

File tree

3 files changed

+11
-10
lines changed

3 files changed

+11
-10
lines changed

c/interface.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -760,9 +760,7 @@ JSValue qts_resolve_func_data(
760760
}
761761

762762
MaybeAsync(JSValue *) QTS_Eval(JSContext *ctx, BorrowedHeapChar *js_code, size_t js_code_length, const char *filename, EvalDetectModule detectModule, EvalFlags evalFlags) {
763-
#ifdef QTS_DEBUG_MODE
764763
char msg[LOG_LEN];
765-
#endif
766764
if (detectModule) {
767765
if (JS_DetectModule((const char *)js_code, js_code_length)) {
768766
QTS_DEBUG("QTS_Eval: Detected module = true");

packages/quickjs-emscripten-core/src/memory.ts

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,26 @@ import type { QuickJSHandle } from "./types"
1010
/**
1111
* @private
1212
*/
13-
type HeapUint8Array = {
13+
export type HeapUint8Array = {
1414
pointer: JSVoidPointer
1515
numBytes: number
1616
}
1717

18-
// Add more types as needed.
19-
type TypedArray = Int32Array | Uint32Array
18+
/**
19+
* Add more types as needed.
20+
* @private
21+
*/
22+
export type TypedArray = Int32Array | Uint32Array
2023

21-
interface TypedArrayConstructor<T> {
24+
/** @private */
25+
export interface TypedArrayConstructor<T> {
2226
new (length: number): T
2327
new (array: ArrayLike<number> | ArrayBufferLike): T
2428
new (buffer: ArrayBufferLike, byteOffset?: number, length?: number): T
2529
BYTES_PER_ELEMENT: number
2630
}
2731

32+
/** @private */
2833
export type HeapTypedArray<JS extends TypedArray, C extends number> = Lifetime<{
2934
typedArray: JS
3035
ptr: C

packages/quickjs-emscripten/src/quickjs.test.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ import {
4343
RELEASE_ASYNC,
4444
newVariant,
4545
shouldInterruptAfterDeadline,
46+
Scope,
4647
} from "."
47-
import { Scope } from "quickjs-emscripten-core"
4848

4949
const TEST_SLOW = !process.env.TEST_FAST
5050
const TEST_NG = TEST_SLOW && !process.env.TEST_NO_NG
@@ -117,7 +117,7 @@ function contextTests(getContext: GetTestContext, isDebug = false) {
117117
}
118118
// https://web.dev/webassembly-memory-debugging/
119119
assert.strictEqual(ffi.QTS_RecoverableLeakCheck(), 0, "No lsan errors")
120-
console.log("Leaks checked (OK)")
120+
debugLog("Leaks checked (OK)")
121121
})
122122

123123
const getTestId = () => `test-${getContext.name}-${testId}`
@@ -423,8 +423,6 @@ function contextTests(getContext: GetTestContext, isDebug = false) {
423423
.unwrap(),
424424
)
425425

426-
console.log(props.map((p) => vm.dump(p)))
427-
428426
assert.strictEqual(props.length, 3)
429427
assert.strictEqual(vm.dump(props[0]), 0)
430428
assert.strictEqual(vm.dump(props[1]), 1)

0 commit comments

Comments
 (0)