aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/eval.h
diff options
context:
space:
mode:
authorZyX <kp-pav@yandex.ru>2016-01-24 03:40:44 +0300
committerZyX <kp-pav@yandex.ru>2016-04-18 02:44:03 +0300
commit44cbf45d2696f210a1fa05bf6babea30bcec7616 (patch)
tree2ece7e17b1fa6dc0de7199b3f7067dfdfb14189a /src/nvim/eval.h
parent83c683f5e15867c2e2889442860e91fd1074b4e1 (diff)
downloadrneovim-44cbf45d2696f210a1fa05bf6babea30bcec7616.tar.gz
rneovim-44cbf45d2696f210a1fa05bf6babea30bcec7616.tar.bz2
rneovim-44cbf45d2696f210a1fa05bf6babea30bcec7616.zip
eval: Split out typval_T dumping functions to nvim/encode.c
Diffstat (limited to 'src/nvim/eval.h')
-rw-r--r--src/nvim/eval.h37
1 files changed, 33 insertions, 4 deletions
diff --git a/src/nvim/eval.h b/src/nvim/eval.h
index f51b0f4921..e8b5964775 100644
--- a/src/nvim/eval.h
+++ b/src/nvim/eval.h
@@ -4,9 +4,22 @@
#include <msgpack.h>
#include "nvim/profile.h"
+#include "nvim/hashtab.h" // For hashtab_T
+#include "nvim/garray.h" // For garray_T
+#include "nvim/buffer_defs.h" // For scid_T
+#include "nvim/ex_cmds_defs.h" // For exarg_T
+
+#define COPYID_INC 2
+#define COPYID_MASK (~0x1)
// All user-defined functions are found in this hashtable.
-EXTERN hashtab_T func_hashtab;
+extern hashtab_T func_hashtab;
+
+/// CopyID for recursively traversing lists and dicts
+///
+/// This value is needed to avoid endless recursiveness. Last bit is used for
+/// previous_funccal and normally ignored when comparing.
+extern int current_copyID;
// Structure to hold info for a user function.
typedef struct ufunc ufunc_T;
@@ -117,12 +130,28 @@ enum {
VV_LEN, // number of v: vars
};
+/// All recognized msgpack types
+typedef enum {
+ kMPNil,
+ kMPBoolean,
+ kMPInteger,
+ kMPFloat,
+ kMPString,
+ kMPBinary,
+ kMPArray,
+ kMPMap,
+ kMPExt,
+#define LAST_MSGPACK_TYPE kMPExt
+} MessagePackType;
+
+/// Array mapping values from MessagePackType to corresponding list pointers
+extern const list_T *eval_msgpack_type_lists[LAST_MSGPACK_TYPE + 1];
+
+#undef LAST_MSGPACK_TYPE
+
/// Maximum number of function arguments
#define MAX_FUNC_ARGS 20
-int vim_to_msgpack(msgpack_packer *const, typval_T *const,
- const char *const objname);
-
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "eval.h.generated.h"
#endif