API: Move helper functions to another module

This commit is contained in:
Thiago de Arruda
2014-05-08 16:20:24 -03:00
parent e07099cb78
commit 7b04674174
4 changed files with 85 additions and 56 deletions

19
src/api/helpers.h Normal file
View File

@@ -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 */