Export DNS resolver functionality
[iolib.git] / src / base / debug.lisp
blob7d6494e302b159c0d1bb481eba0332dad516db92
1 ;;;; -*- Mode: Lisp; indent-tabs-mode: nil -*-
2 ;;;
3 ;;; --- Debug helpers.
4 ;;;
6 (in-package :iolib.base)
8 (defvar *safety-checks*
9 #+iolib-debug t #-iolib-debug nil
10 "Enables safety checks throught the IOLib codebase.")
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))