Carp/core/Unsafe.carp
2020-05-12 21:58:40 +02:00

8 lines
296 B
Plaintext

(defmodule Unsafe
(doc coerce "coerces a value of type `b` to a value of type `a`.")
(deftemplate coerce (Fn [b] a) "$a $NAME($b b)" "$DECL { return ($a)b; }")
(doc leak "prevents a destructor from being run on a value a.")
(deftemplate leak (Fn [a] ()) "void $NAME($a a)" "$DECL {}")
)