about summary refs log tree commit diff stats
path: root/src/js
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2024-01-29 17:27:55 +0100
committerbptato <nincsnevem662@gmail.com>2024-01-29 17:31:18 +0100
commit2a18436ca92bc46034fd8a21b2949b3991f4b0a4 (patch)
tree05a754d7fb6762229d8c3804af165edd912b0e97 /src/js
parentc6ad06871476379d7ed81be0c05dc4c50cd788b8 (diff)
downloadchawan-2a18436ca92bc46034fd8a21b2949b3991f4b0a4.tar.gz
js: always use var destructor
See https://forum.nim-lang.org/t/10807
Diffstat (limited to 'src/js')
-rw-r--r--src/js/javascript.nim10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/js/javascript.nim b/src/js/javascript.nim
index f5a00d80..9e814386 100644
--- a/src/js/javascript.nim
+++ b/src/js/javascript.nim
@@ -1289,20 +1289,14 @@ type
 template jsDestructor*[U](T: typedesc[ref U]) =
   static:
     jsDtors.incl($T)
-  when NimMajor >= 2:
-    proc `=destroy`(obj: U) =
-      nim_finalize_for_js(addr obj)
-  else:
+  {.warning[Deprecated]:off.}:
     proc `=destroy`(obj: var U) =
       nim_finalize_for_js(addr obj)
 
 template jsDestructor*(T: typedesc[object]) =
   static:
     jsDtors.incl($T)
-  when NimMajor >= 2:
-    proc `=destroy`(obj: T) =
-      nim_finalize_for_js(addr obj)
-  else:
+  {.warning[Deprecated]:off.}:
     proc `=destroy`(obj: var T) =
       nim_finalize_for_js(addr obj)