summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/genie/src/host/path_getabsolute.c
diff options
context:
space:
mode:
Diffstat (limited to '3rdparty/genie/src/host/path_getabsolute.c')
-rw-r--r--3rdparty/genie/src/host/path_getabsolute.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/3rdparty/genie/src/host/path_getabsolute.c b/3rdparty/genie/src/host/path_getabsolute.c
new file mode 100644
index 00000000000..f0a7b6e532c
--- /dev/null
+++ b/3rdparty/genie/src/host/path_getabsolute.c
@@ -0,0 +1,15 @@
+/**
+ * \file path_getabsolute.c
+ * \brief Calculate the absolute path from a relative path
+ */
+
+#include "premake.h"
+
+int path_getabsolute(lua_State *L)
+{
+ const char *path = luaL_checkstring(L, -1);
+ char buffer[PATH_BUFSIZE];
+ get_absolute_path(path, buffer, PATH_BUFSIZE);
+ lua_pushstring(L, buffer);
+ return 1;
+}