summaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/base64url.h2
-rw-r--r--src/lib/base64url.lua3
-rw-r--r--src/lib/clock.h4
-rw-r--r--src/lib/getopt.lua3
-rw-r--r--src/lib/trie.h2
5 files changed, 8 insertions, 6 deletions
diff --git a/src/lib/base64url.h b/src/lib/base64url.h
index d355598..f2f5808 100644
--- a/src/lib/base64url.h
+++ b/src/lib/base64url.h
@@ -23,6 +23,6 @@
#ifndef __dnsjit_lib_base64url_h
#define __dnsjit_lib_base64url_h
-#include "lib/base64url.hh"
+#include <dnsjit/lib/base64url.hh>
#endif
diff --git a/src/lib/base64url.lua b/src/lib/base64url.lua
index e9966d5..8a408f5 100644
--- a/src/lib/base64url.lua
+++ b/src/lib/base64url.lua
@@ -93,6 +93,5 @@ function Base64Url.decode(data)
return ffi.string(buf, out_len)
end
--- dnsjit.core.object.payload(3)
--- dnsjit.output.dnssim (3)
+-- dnsjit.core.object.payload (3)
return Base64Url
diff --git a/src/lib/clock.h b/src/lib/clock.h
index 0dc0faa..48d16ac 100644
--- a/src/lib/clock.h
+++ b/src/lib/clock.h
@@ -18,11 +18,11 @@
* along with dnsjit. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "core/timespec.h"
+#include <dnsjit/core/timespec.h>
#ifndef __dnsjit_lib_clock_h
#define __dnsjit_lib_clock_h
-#include "lib/clock.hh"
+#include <dnsjit/lib/clock.hh>
#endif
diff --git a/src/lib/getopt.lua b/src/lib/getopt.lua
index 91ce6cd..ede3e12 100644
--- a/src/lib/getopt.lua
+++ b/src/lib/getopt.lua
@@ -122,6 +122,9 @@ function Getopt:add(short, long, default, help, extensions)
elseif name == "" then
error("name (long|short) needs to be set")
end
+ if short and (type(short) ~= "string" or #short ~= 1) then
+ error("short needs to be a string of length 1")
+ end
if self._opt[name] then
error("option "..name.." alredy exists")
diff --git a/src/lib/trie.h b/src/lib/trie.h
index 3ce881c..b8b8b78 100644
--- a/src/lib/trie.h
+++ b/src/lib/trie.h
@@ -22,7 +22,7 @@
#ifndef __dnsjit_contrib_trie_h
#define __dnsjit_contrib_trie_h
-#include "lib/trie.hh"
+#include <dnsjit/lib/trie.hh>
#ifndef likely
/*! \brief Optimize for x to be true value. */