diff options
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 |