diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-12-01 08:06:37 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-01 08:06:37 +0800 |
commit | 09e93d7c4d33451ffe2dd2edeb7e2124b83c8078 (patch) | |
tree | c0d1d3de8f4dbd578e6c4d53bb91a55896b169c2 /src/nvim/rbuffer.h | |
parent | b32b5b2711ed338f4944c983a247f80c3163f87c (diff) | |
download | rneovim-09e93d7c4d33451ffe2dd2edeb7e2124b83c8078.tar.gz rneovim-09e93d7c4d33451ffe2dd2edeb7e2124b83c8078.tar.bz2 rneovim-09e93d7c4d33451ffe2dd2edeb7e2124b83c8078.zip |
refactor(IWYU): create {ex_getln,rbuffer,os/fileio}_defs.h (#26338)
Diffstat (limited to 'src/nvim/rbuffer.h')
-rw-r--r-- | src/nvim/rbuffer.h | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/src/nvim/rbuffer.h b/src/nvim/rbuffer.h index 55e9849d3d..78483b2a50 100644 --- a/src/nvim/rbuffer.h +++ b/src/nvim/rbuffer.h @@ -16,6 +16,8 @@ #include <stddef.h> #include <stdint.h> +#include "nvim/rbuffer_defs.h" // IWYU pragma: export + // Macros that simplify working with the read/write pointers directly by hiding // ring buffer wrap logic. Some examples: // @@ -64,22 +66,6 @@ i-- > 0 ? ((int)(c = *rbuffer_get(buf, i))) || 1 : 0; \ ) -typedef struct rbuffer RBuffer; -/// Type of function invoked during certain events: -/// - When the RBuffer switches to the full state -/// - When the RBuffer switches to the non-full state -typedef void (*rbuffer_callback)(RBuffer *buf, void *data); - -struct rbuffer { - rbuffer_callback full_cb, nonfull_cb; - void *data; - size_t size; - // helper memory used to by rbuffer_reset if required - char *temp; - char *end_ptr, *read_ptr, *write_ptr; - char start_ptr[]; -}; - #ifdef INCLUDE_GENERATED_DECLARATIONS # include "rbuffer.h.generated.h" #endif |