Skip to content

Commit baba790

Browse files
committed
Allow src/cencode.c to compile under C++
1 parent cf1bcb9 commit baba790

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/cencode.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ For details, see http://sourceforge.net/projects/libb64
77

88
#include "b64/cencode.h"
99

10+
#ifdef __cplusplus
11+
namespace base64 {
12+
#endif
13+
1014
void base64_init_encodestate(base64_encodestate* state_in)
1115
{
1216
state_in->step = step_A;
@@ -104,3 +108,6 @@ int base64_encode_blockend(char* code_out, base64_encodestate* state_in)
104108
return (int)(codechar - code_out);
105109
}
106110

111+
#ifdef __cplusplus
112+
} // namespace base64
113+
#endif

0 commit comments

Comments
 (0)