aboutsummaryrefslogtreecommitdiff
path: root/src/api/helpers.h
diff options
context:
space:
mode:
authorThiago de Arruda <tpadilha84@gmail.com>2014-05-08 16:20:24 -0300
committerThiago de Arruda <tpadilha84@gmail.com>2014-05-13 09:33:40 -0300
commit7b04674174c00b85fb75579bbc49524f7ba74afa (patch)
tree646f1d217cf2ea6a4d7ead84409e48e8a11a66ae /src/api/helpers.h
parente07099cb7892a4786416c516eea29480e159b128 (diff)
downloadrneovim-7b04674174c00b85fb75579bbc49524f7ba74afa.tar.gz
rneovim-7b04674174c00b85fb75579bbc49524f7ba74afa.tar.bz2
rneovim-7b04674174c00b85fb75579bbc49524f7ba74afa.zip
API: Move helper functions to another module
Diffstat (limited to 'src/api/helpers.h')
-rw-r--r--src/api/helpers.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/api/helpers.h b/src/api/helpers.h
new file mode 100644
index 0000000000..6d73b6f742
--- /dev/null
+++ b/src/api/helpers.h
@@ -0,0 +1,19 @@
+#ifndef NEOVIM_API_HELPERS_H
+#define NEOVIM_API_HELPERS_H
+
+#include <stdbool.h>
+
+#include "api/defs.h"
+
+/// Start block that may cause vimscript exceptions
+void try_start(void);
+
+/// End try block, set the error message if any and return true if an error
+/// occurred.
+///
+/// @param err Pointer to the stack-allocated error object
+/// @return true if an error occurred
+bool try_end(Error *err);
+
+#endif /* NEOVIM_API_HELPERS_H */
+