aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/eval/typval_encode.h
diff options
context:
space:
mode:
authordundargoc <33953936+dundargoc@users.noreply.github.com>2021-10-09 14:20:16 +0200
committerGitHub <noreply@github.com>2021-10-09 05:20:16 -0700
commit0fc8597f011e0927e529abd11bf0ddd8d0d1eaab (patch)
tree2339570a059d7ebb41f26db32b032440d1505ee7 /src/nvim/eval/typval_encode.h
parenta36c6e5df959867ff4041405f4098b7833281517 (diff)
downloadrneovim-0fc8597f011e0927e529abd11bf0ddd8d0d1eaab.tar.gz
rneovim-0fc8597f011e0927e529abd11bf0ddd8d0d1eaab.tar.bz2
rneovim-0fc8597f011e0927e529abd11bf0ddd8d0d1eaab.zip
refactor: format header files with uncrustify #15877
* refactor: format header files with uncrustify * fixup(justin): skip formatting of terminfo_defs.h * fixup: force winsock2 to be included first * fixup: simplify disable/enable directive to "uncrustify:off/on"
Diffstat (limited to 'src/nvim/eval/typval_encode.h')
-rw-r--r--src/nvim/eval/typval_encode.h38
1 files changed, 19 insertions, 19 deletions
diff --git a/src/nvim/eval/typval_encode.h b/src/nvim/eval/typval_encode.h
index 3475f6d8b3..d5cf431870 100644
--- a/src/nvim/eval/typval_encode.h
+++ b/src/nvim/eval/typval_encode.h
@@ -5,14 +5,14 @@
#ifndef NVIM_EVAL_TYPVAL_ENCODE_H
#define NVIM_EVAL_TYPVAL_ENCODE_H
-#include <stddef.h>
+#include <assert.h>
#include <inttypes.h>
+#include <stddef.h>
#include <string.h>
-#include <assert.h>
-#include "nvim/lib/kvec.h"
#include "nvim/eval/typval.h"
#include "nvim/func_attr.h"
+#include "nvim/lib/kvec.h"
/// Type of the stack entry
typedef enum {
@@ -87,7 +87,7 @@ static inline size_t tv_strlen(const typval_T *const tv)
assert(tv->v_type == VAR_STRING);
return (tv->vval.v_string == NULL
? 0
- : strlen((char *) tv->vval.v_string));
+ : strlen((char *)tv->vval.v_string));
}
/// Code for checking whether container references itself
@@ -100,19 +100,19 @@ static inline size_t tv_strlen(const typval_T *const tv)
/// @param conv_type Type of the conversion, @see MPConvStackValType.
#define _TYPVAL_ENCODE_DO_CHECK_SELF_REFERENCE(val, copyID_attr, copyID, \
conv_type) \
- do { \
- const int te_csr_ret = _TYPVAL_ENCODE_CHECK_SELF_REFERENCE( \
- TYPVAL_ENCODE_FIRST_ARG_NAME, \
- (val), &(val)->copyID_attr, mpstack, copyID, conv_type, objname); \
- if (te_csr_ret != NOTDONE) { \
- return te_csr_ret; \
- } \
- } while (0)
+ do { \
+ const int te_csr_ret = _TYPVAL_ENCODE_CHECK_SELF_REFERENCE(TYPVAL_ENCODE_FIRST_ARG_NAME, \
+ (val), &(val)->copyID_attr, mpstack, \
+ copyID, conv_type, objname); \
+ if (te_csr_ret != NOTDONE) { \
+ return te_csr_ret; \
+ } \
+ } while (0)
#define _TYPVAL_ENCODE_FUNC_NAME_INNER_2(pref, name, suf) \
- pref##name##suf
+ pref##name##suf
#define _TYPVAL_ENCODE_FUNC_NAME_INNER(pref, name, suf) \
- _TYPVAL_ENCODE_FUNC_NAME_INNER_2(pref, name, suf)
+ _TYPVAL_ENCODE_FUNC_NAME_INNER_2(pref, name, suf)
/// Construct function name, possibly using macros
///
@@ -125,22 +125,22 @@ static inline size_t tv_strlen(const typval_T *const tv)
///
/// @return Concat: pref + #TYPVAL_ENCODE_NAME + suf.
#define _TYPVAL_ENCODE_FUNC_NAME(pref, suf) \
- _TYPVAL_ENCODE_FUNC_NAME_INNER(pref, TYPVAL_ENCODE_NAME, suf)
+ _TYPVAL_ENCODE_FUNC_NAME_INNER(pref, TYPVAL_ENCODE_NAME, suf)
/// Self reference checker function name
#define _TYPVAL_ENCODE_CHECK_SELF_REFERENCE \
- _TYPVAL_ENCODE_FUNC_NAME(_typval_encode_, _check_self_reference)
+ _TYPVAL_ENCODE_FUNC_NAME(_typval_encode_, _check_self_reference)
/// Entry point function name
#define _TYPVAL_ENCODE_ENCODE \
- _TYPVAL_ENCODE_FUNC_NAME(encode_vim_to_, )
+ _TYPVAL_ENCODE_FUNC_NAME(encode_vim_to_, )
/// Name of the …convert_one_value function
#define _TYPVAL_ENCODE_CONVERT_ONE_VALUE \
- _TYPVAL_ENCODE_FUNC_NAME(_typval_encode_, _convert_one_value)
+ _TYPVAL_ENCODE_FUNC_NAME(_typval_encode_, _convert_one_value)
/// Name of the dummy const dict_T *const variable
#define TYPVAL_ENCODE_NODICT_VAR \
- _TYPVAL_ENCODE_FUNC_NAME(_typval_encode_, _nodict_var)
+ _TYPVAL_ENCODE_FUNC_NAME(_typval_encode_, _nodict_var)
#endif // NVIM_EVAL_TYPVAL_ENCODE_H