]> git.lizzy.rs Git - uwu-lang.git/blobdiff - common/dl.h
Turn common back into a normal directory (instead of a submodule)
[uwu-lang.git] / common / dl.h
diff --git a/common/dl.h b/common/dl.h
new file mode 100644 (file)
index 0000000..04a2cd7
--- /dev/null
@@ -0,0 +1,14 @@
+#ifndef _UWU_COMMON_DL_H_
+#define _UWU_COMMON_DL_H_
+
+#include <dlfcn.h>
+#include "err.h"
+
+inline static void check_dlerror()
+{
+       char *err = dlerror();
+       if (err)
+               error("library error: %s\n", err);
+}
+
+#endif