From 224f303ee54c54d2147f03010385e8cc48e42869 Mon Sep 17 00:00:00 2001 From: Gregory Anders <8965202+gpanders@users.noreply.github.com> Date: Tue, 31 Oct 2023 09:15:32 -0500 Subject: feat(stdlib): add vim.base64 module (#25843) Add base64 encode() and decode() functions to a vim.base64 module. --- src/nvim/lua/base64.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 src/nvim/lua/base64.h (limited to 'src/nvim/lua/base64.h') diff --git a/src/nvim/lua/base64.h b/src/nvim/lua/base64.h new file mode 100644 index 0000000000..570d9eb677 --- /dev/null +++ b/src/nvim/lua/base64.h @@ -0,0 +1,12 @@ +#ifndef NVIM_LUA_BASE64_H +#define NVIM_LUA_BASE64_H + +#include +#include +#include + +#ifdef INCLUDE_GENERATED_DECLARATIONS +# include "lua/base64.h.generated.h" +#endif + +#endif // NVIM_LUA_BASE64_H -- cgit From 4f8941c1a5f1ef6caa410feeb52e343db22763ce Mon Sep 17 00:00:00 2001 From: dundargoc Date: Fri, 10 Nov 2023 12:23:42 +0100 Subject: refactor: replace manual header guards with #pragma once It is less error-prone than manually defining header guards. Pretty much all compilers support it even if it's not part of the C standard. --- src/nvim/lua/base64.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/nvim/lua/base64.h') diff --git a/src/nvim/lua/base64.h b/src/nvim/lua/base64.h index 570d9eb677..feb409ef38 100644 --- a/src/nvim/lua/base64.h +++ b/src/nvim/lua/base64.h @@ -1,5 +1,4 @@ -#ifndef NVIM_LUA_BASE64_H -#define NVIM_LUA_BASE64_H +#pragma once #include #include @@ -8,5 +7,3 @@ #ifdef INCLUDE_GENERATED_DECLARATIONS # include "lua/base64.h.generated.h" #endif - -#endif // NVIM_LUA_BASE64_H -- cgit From 574d25642fc9ca65b396633aeab6e2d32778b642 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Mon, 27 Nov 2023 17:21:58 +0800 Subject: refactor: move Arena and ArenaMem to memory_defs.h (#26240) --- src/nvim/lua/base64.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/nvim/lua/base64.h') diff --git a/src/nvim/lua/base64.h b/src/nvim/lua/base64.h index feb409ef38..3c95968cda 100644 --- a/src/nvim/lua/base64.h +++ b/src/nvim/lua/base64.h @@ -1,8 +1,6 @@ #pragma once -#include -#include -#include +#include // IWYU pragma: keep #ifdef INCLUDE_GENERATED_DECLARATIONS # include "lua/base64.h.generated.h" -- cgit