mirror of
https://github.com/neovim/neovim.git
synced 2025-09-13 06:48:17 +00:00
refactor: move FunPtr to types.h (#19466)
This type itself is not eval-specific. Moving it to types.h can avoid including eval/funcs.h in many headers, and types.h is already included by many headers.
This commit is contained in:
@@ -1,7 +1,6 @@
|
|||||||
#ifndef NVIM_DIGRAPH_H
|
#ifndef NVIM_DIGRAPH_H
|
||||||
#define NVIM_DIGRAPH_H
|
#define NVIM_DIGRAPH_H
|
||||||
|
|
||||||
#include "nvim/eval/funcs.h"
|
|
||||||
#include "nvim/ex_cmds_defs.h"
|
#include "nvim/ex_cmds_defs.h"
|
||||||
#include "nvim/types.h"
|
#include "nvim/types.h"
|
||||||
|
|
||||||
|
@@ -3,7 +3,6 @@
|
|||||||
|
|
||||||
#include "nvim/buffer_defs.h"
|
#include "nvim/buffer_defs.h"
|
||||||
#include "nvim/channel.h"
|
#include "nvim/channel.h"
|
||||||
#include "nvim/eval/funcs.h" // For FunPtr
|
|
||||||
#include "nvim/event/time.h" // For TimeWatcher
|
#include "nvim/event/time.h" // For TimeWatcher
|
||||||
#include "nvim/ex_cmds_defs.h" // For exarg_T
|
#include "nvim/ex_cmds_defs.h" // For exarg_T
|
||||||
#include "nvim/os/fileio.h" // For FileDescriptor
|
#include "nvim/os/fileio.h" // For FileDescriptor
|
||||||
|
@@ -4,8 +4,6 @@
|
|||||||
#include "nvim/buffer_defs.h"
|
#include "nvim/buffer_defs.h"
|
||||||
#include "nvim/eval/typval.h"
|
#include "nvim/eval/typval.h"
|
||||||
|
|
||||||
typedef void (*FunPtr)(void);
|
|
||||||
|
|
||||||
/// Prototype of C function that implements VimL function
|
/// Prototype of C function that implements VimL function
|
||||||
typedef void (*VimLFunc)(typval_T *args, typval_T *rvar, FunPtr data);
|
typedef void (*VimLFunc)(typval_T *args, typval_T *rvar, FunPtr data);
|
||||||
|
|
||||||
|
@@ -9,6 +9,7 @@
|
|||||||
#include "nvim/edit.h"
|
#include "nvim/edit.h"
|
||||||
#include "nvim/eval.h"
|
#include "nvim/eval.h"
|
||||||
#include "nvim/eval/encode.h"
|
#include "nvim/eval/encode.h"
|
||||||
|
#include "nvim/eval/funcs.h"
|
||||||
#include "nvim/eval/userfunc.h"
|
#include "nvim/eval/userfunc.h"
|
||||||
#include "nvim/eval/vars.h"
|
#include "nvim/eval/vars.h"
|
||||||
#include "nvim/ex_cmds2.h"
|
#include "nvim/ex_cmds2.h"
|
||||||
|
@@ -1,7 +1,6 @@
|
|||||||
#ifndef NVIM_EVAL_VARS_H
|
#ifndef NVIM_EVAL_VARS_H
|
||||||
#define NVIM_EVAL_VARS_H
|
#define NVIM_EVAL_VARS_H
|
||||||
|
|
||||||
#include "nvim/eval/funcs.h" // For FunPtr
|
|
||||||
#include "nvim/ex_cmds_defs.h" // For exarg_T
|
#include "nvim/ex_cmds_defs.h" // For exarg_T
|
||||||
|
|
||||||
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
||||||
|
@@ -1,7 +1,6 @@
|
|||||||
#ifndef NVIM_EX_DOCMD_H
|
#ifndef NVIM_EX_DOCMD_H
|
||||||
#define NVIM_EX_DOCMD_H
|
#define NVIM_EX_DOCMD_H
|
||||||
|
|
||||||
#include "nvim/eval/funcs.h"
|
|
||||||
#include "nvim/ex_cmds_defs.h"
|
#include "nvim/ex_cmds_defs.h"
|
||||||
#include "nvim/globals.h"
|
#include "nvim/globals.h"
|
||||||
|
|
||||||
|
@@ -24,6 +24,7 @@
|
|||||||
#include "nvim/digraph.h"
|
#include "nvim/digraph.h"
|
||||||
#include "nvim/edit.h"
|
#include "nvim/edit.h"
|
||||||
#include "nvim/eval.h"
|
#include "nvim/eval.h"
|
||||||
|
#include "nvim/eval/funcs.h"
|
||||||
#include "nvim/eval/userfunc.h"
|
#include "nvim/eval/userfunc.h"
|
||||||
#include "nvim/event/loop.h"
|
#include "nvim/event/loop.h"
|
||||||
#include "nvim/ex_cmds.h"
|
#include "nvim/ex_cmds.h"
|
||||||
|
@@ -1,7 +1,6 @@
|
|||||||
#ifndef NVIM_INSEXPAND_H
|
#ifndef NVIM_INSEXPAND_H
|
||||||
#define NVIM_INSEXPAND_H
|
#define NVIM_INSEXPAND_H
|
||||||
|
|
||||||
#include "nvim/eval/funcs.h"
|
|
||||||
#include "nvim/vim.h"
|
#include "nvim/vim.h"
|
||||||
|
|
||||||
/// state for pum_ext_select_item.
|
/// state for pum_ext_select_item.
|
||||||
|
@@ -15,6 +15,7 @@
|
|||||||
#include "nvim/buffer_defs.h"
|
#include "nvim/buffer_defs.h"
|
||||||
#include "nvim/change.h"
|
#include "nvim/change.h"
|
||||||
#include "nvim/cursor.h"
|
#include "nvim/cursor.h"
|
||||||
|
#include "nvim/eval/funcs.h"
|
||||||
#include "nvim/eval/typval.h"
|
#include "nvim/eval/typval.h"
|
||||||
#include "nvim/eval/userfunc.h"
|
#include "nvim/eval/userfunc.h"
|
||||||
#include "nvim/event/loop.h"
|
#include "nvim/event/loop.h"
|
||||||
|
@@ -2,7 +2,6 @@
|
|||||||
#define NVIM_MAPPING_H
|
#define NVIM_MAPPING_H
|
||||||
|
|
||||||
#include "nvim/buffer_defs.h"
|
#include "nvim/buffer_defs.h"
|
||||||
#include "nvim/eval/funcs.h"
|
|
||||||
#include "nvim/ex_cmds_defs.h"
|
#include "nvim/ex_cmds_defs.h"
|
||||||
#include "nvim/types.h"
|
#include "nvim/types.h"
|
||||||
#include "nvim/vim.h"
|
#include "nvim/vim.h"
|
||||||
|
@@ -7,6 +7,7 @@
|
|||||||
|
|
||||||
#include "nvim/buffer_defs.h"
|
#include "nvim/buffer_defs.h"
|
||||||
#include "nvim/charset.h"
|
#include "nvim/charset.h"
|
||||||
|
#include "nvim/eval/funcs.h"
|
||||||
#include "nvim/fold.h"
|
#include "nvim/fold.h"
|
||||||
#include "nvim/highlight_group.h"
|
#include "nvim/highlight_group.h"
|
||||||
#include "nvim/match.h"
|
#include "nvim/match.h"
|
||||||
|
@@ -2,7 +2,6 @@
|
|||||||
#define NVIM_MATCH_H
|
#define NVIM_MATCH_H
|
||||||
|
|
||||||
#include "nvim/buffer_defs.h"
|
#include "nvim/buffer_defs.h"
|
||||||
#include "nvim/eval/funcs.h"
|
|
||||||
#include "nvim/ex_cmds_defs.h"
|
#include "nvim/ex_cmds_defs.h"
|
||||||
|
|
||||||
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
||||||
|
@@ -18,6 +18,7 @@
|
|||||||
#include "nvim/cursor.h"
|
#include "nvim/cursor.h"
|
||||||
#include "nvim/edit.h"
|
#include "nvim/edit.h"
|
||||||
#include "nvim/eval.h"
|
#include "nvim/eval.h"
|
||||||
|
#include "nvim/eval/funcs.h"
|
||||||
#include "nvim/ex_cmds.h"
|
#include "nvim/ex_cmds.h"
|
||||||
#include "nvim/ex_cmds2.h"
|
#include "nvim/ex_cmds2.h"
|
||||||
#include "nvim/ex_getln.h"
|
#include "nvim/ex_getln.h"
|
||||||
|
@@ -5,7 +5,6 @@
|
|||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
#include "nvim/buffer_defs.h"
|
#include "nvim/buffer_defs.h"
|
||||||
#include "nvim/eval/funcs.h"
|
|
||||||
#include "nvim/eval/typval.h"
|
#include "nvim/eval/typval.h"
|
||||||
#include "nvim/normal.h"
|
#include "nvim/normal.h"
|
||||||
#include "nvim/os/time.h"
|
#include "nvim/os/time.h"
|
||||||
|
@@ -10,6 +10,7 @@
|
|||||||
#include "nvim/charset.h"
|
#include "nvim/charset.h"
|
||||||
#include "nvim/cursor.h"
|
#include "nvim/cursor.h"
|
||||||
#include "nvim/edit.h"
|
#include "nvim/edit.h"
|
||||||
|
#include "nvim/eval/funcs.h"
|
||||||
#include "nvim/ex_docmd.h"
|
#include "nvim/ex_docmd.h"
|
||||||
#include "nvim/fold.h"
|
#include "nvim/fold.h"
|
||||||
#include "nvim/highlight_group.h"
|
#include "nvim/highlight_group.h"
|
||||||
|
@@ -4,7 +4,6 @@
|
|||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
|
||||||
#include "nvim/buffer_defs.h"
|
#include "nvim/buffer_defs.h"
|
||||||
#include "nvim/eval/funcs.h"
|
|
||||||
#include "nvim/ex_cmds_defs.h"
|
#include "nvim/ex_cmds_defs.h"
|
||||||
#include "nvim/sign_defs.h"
|
#include "nvim/sign_defs.h"
|
||||||
|
|
||||||
|
@@ -1,7 +1,6 @@
|
|||||||
#ifndef NVIM_TESTING_H
|
#ifndef NVIM_TESTING_H
|
||||||
#define NVIM_TESTING_H
|
#define NVIM_TESTING_H
|
||||||
|
|
||||||
#include "nvim/eval/funcs.h"
|
|
||||||
#include "nvim/eval/typval.h"
|
#include "nvim/eval/typval.h"
|
||||||
|
|
||||||
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
||||||
|
@@ -22,6 +22,8 @@ typedef int handle_T;
|
|||||||
// absent callback etc.
|
// absent callback etc.
|
||||||
typedef int LuaRef;
|
typedef int LuaRef;
|
||||||
|
|
||||||
|
typedef void (*FunPtr)(void);
|
||||||
|
|
||||||
typedef handle_T NS;
|
typedef handle_T NS;
|
||||||
|
|
||||||
typedef struct expand expand_T;
|
typedef struct expand expand_T;
|
||||||
|
Reference in New Issue
Block a user