Skip to content

Commit 1d3fcdf

Browse files
committed
update
Signed-off-by: George Lemon <georgelemon@protonmail.com>
1 parent 9b17001 commit 1d3fcdf

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

src/tim/engine/stdlib/libsystem.nim

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ proc loadLibrary*(script: Script): Module =
155155
of tyString: "string"
156156
of tyJsonStorage: "json"
157157
of tyArrayObject: "array"
158-
of tyHtmlObject: "html"
158+
# of tyHtmlObject: "html"
159159
# of ttyPointer: "pointer"
160160
else: "object"
161161
result = initValue(valueType))
@@ -307,7 +307,8 @@ proc loadLibrary*(script: Script): Module =
307307

308308
script.addProc(result, "echo", @[paramDef("x", ttyNil)], ttyVoid,
309309
proc (args: StackView, argc: int): Value =
310-
echo "nil")
310+
echo "nil"
311+
)
311312

312313
script.addProc(result, "echo", @[paramDef("x", ttyObject)], ttyVoid,
313314
proc (args: StackView, argc: int): Value =
@@ -321,10 +322,10 @@ proc loadLibrary*(script: Script): Module =
321322

322323
script.addProc(result, "echo", @[paramDef("x", ttyPointer)], ttyVoid,
323324
proc (args: StackView, argc: int): Value =
324-
if args[0].objectVal == nil or args[0].objectVal.data == nil:
325+
if args[0].objectVal == nil or args[0].objectVal.foreign.data == nil:
325326
echo "pointer(nil)"
326327
else:
327-
echo "pointer(", $(cast[int64](args[0].objectVal.data)), ")"
328+
echo "pointer(", $(cast[int64](args[0].objectVal.foreign.data)), ")"
328329
)
329330

330331
let genT = ast.newIdent("T")

0 commit comments

Comments
 (0)