mirror of
https://github.com/neovim/neovim.git
synced 2025-09-18 17:28:23 +00:00
API: Extract error boilerplate into a macro
This commit is contained in:
@@ -5,6 +5,12 @@
|
||||
|
||||
#include "api/defs.h"
|
||||
|
||||
#define set_api_error(message, err) \
|
||||
do { \
|
||||
strncpy(err->msg, message, sizeof(err->msg)); \
|
||||
err->set = true; \
|
||||
} while (0)
|
||||
|
||||
/// Start block that may cause vimscript exceptions
|
||||
void try_start(void);
|
||||
|
||||
|
Reference in New Issue
Block a user