shithub: mc

ref: 658dd280c40c5a6edb110e1170013e8479fe2bd0
dir: /lib/std/assert.myr/

View raw version
use "fmt"
use "syswrap"
use "varargs"

pkg std =
	const assert	: (cond : bool, fmt : byte[:], args : ... -> void)
;;

const assert = {cond, msg, args
	var ap

	ap = vastart(&args)
	if !cond
		std.fputv(2, msg, &ap)
		suicide()
	;;
}