Carp/core/Unsafe.carp

10 lines
393 B
Plaintext
Raw Permalink Normal View History

2021-07-05 15:48:35 +03:00
(doc Unsafe "is a module containing unsafe operations. Lasciate ogne speranza,
voi ch'intrate.")
2020-05-12 22:58:40 +03:00
(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 {}")
)