Add ZSTREAM-{READ,WRITE}-VECTOR.
[iolib.git] / base / debug.lisp
blob3c52d85dbe714b740c947743444aeb4b3d43dd59
1 ;;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; indent-tabs-mode: nil -*-
2 ;;;
3 ;;; --- Debug helpers.
4 ;;;
6 (in-package :iolib.base)
8 (defparameter *safety-checks* t
9 "Enables safety checks throught the IOLib codebase.
10 ACHTUNG!!! Don't disable this unless you're very confident about the quality of the code in IOLib.")
12 (defmacro debug-only (&body body)
13 (when *safety-checks*
14 `(progn ,@body)))
16 (defmacro debug-only* (&body body)
17 `(when *safety-checks*
18 (progn ,@body)))
20 (defmacro production-only (&body body)
21 (unless *safety-checks*
22 `(progn ,@body)))
24 (defmacro production-only* (&body body)
25 `(unless *safety-checks*
26 ,@body))