Carp/core/Unsafe.carp
2021-07-05 14:48:35 +02:00

10 lines
393 B
Plaintext

(doc Unsafe "is a module containing unsafe operations. Lasciate ogne speranza,
voi ch'intrate.")
(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 {}")
)