Currently there isn't any, but there will be soon.
While the translator can (at some effort) support alternative roots, they
will require different run-time support machinery.
While the translator can (at some effort) support alternative roots, they
will require different run-time support machinery.
+\begin{describe}{feat}{SOD_RECKLESS}
+ Some of Sod's macros include runtime checking by default. This checking
+ can be disabled if you value performance more than early diagnosis of
+ problems. Define @|SOD_RECKLESS| to a nonzero value before including
+ @|<sod/sod.h>| to inhibit the runtime checking.
+\end{describe}
+
\subsection{Layout utilities} \label{sec:runtime.object.layout}
\subsection{Layout utilities} \label{sec:runtime.object.layout}
\definedescribecategory{ty}{type}
\definedescribecategory{type}{type}
\definedescribecategory{mac}{#1{macro}}
\definedescribecategory{ty}{type}
\definedescribecategory{type}{type}
\definedescribecategory{mac}{#1{macro}}
+\definedescribecategory{feat}{feature macro}
\definedescribecategory{lmac}{local #1{macro}}
\definedescribecategory{parse}{parser spec}
\definedescribecategory{parseform}{parser form}
\definedescribecategory{lmac}{local #1{macro}}
\definedescribecategory{parse}{parser spec}
\definedescribecategory{parseform}{parser form}
root object.
While the translator can (at some effort) support alternative roots,
they will require different run-time support machinery.
root object.
While the translator can (at some effort) support alternative roots,
they will require different run-time support machinery.
+.PP
+Some of Sod's macros include runtime checking by default.
+This checking can be disabled if you value performance
+more than early diagnosis of problems.
+Define
+.B SOD_RECKLESS
+to a nonzero value
+before including
+.B <sod/sod.h>
+to inhibit the runtime checking.
.
.SS Layout utilities
The following macros are useful in
.
.SS Layout utilities
The following macros are useful in
#define SOD__IGNORE(var) ((void)(var))
#define SOD__IGNORE(var) ((void)(var))
+/* --- @SOD__PARANOIA@ --- *
+ *
+ * Arguments: @cond@ = a condition to check
+ * @conseq@ = a thing to evaluate to if the check passes
+ * @alt@ = a thing to do if the check fails
+ *
+ * Use: Check to make sure something is good at runtime, unless
+ * disabled.
+ */
+
+#if SOD_RECKLESS
+# define SOD__PARANOIA(cond, conseq, alt) (conseq)
+#else
+# define SOD__PARANOIA(cond, conseq, alt) ((cond) ? (conseq) : (alt))
+#endif
+
/* --- @SOD__CAR@ --- *
*
* Arguments: @...@ = a nonempty list of arguments
/* --- @SOD__CAR@ --- *
*
* Arguments: @...@ = a nonempty list of arguments