Skip to content

Commit

Permalink
fix extern c directives (#130)
Browse files Browse the repository at this point in the history
  • Loading branch information
charlesnicholson authored Jan 19, 2022
1 parent 053f414 commit d89963a
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions nanoprintf.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,6 @@
For more information, please refer to <http://unlicense.org>
*/

#ifdef __cplusplus
extern "C" {
#endif

#ifndef NANOPRINTF_H_INCLUDED
#define NANOPRINTF_H_INCLUDED

Expand All @@ -60,6 +56,10 @@ extern "C" {

// Public API

#ifdef __cplusplus
extern "C" {
#endif

NPF_VISIBILITY int npf_snprintf(char *buffer, size_t bufsz, const char *format,
...) NPF_PRINTF_ATTR(3, 4);

Expand All @@ -73,6 +73,10 @@ NPF_VISIBILITY int npf_pprintf(npf_putc pc, void *pc_ctx, char const *format,
NPF_VISIBILITY int npf_vpprintf(npf_putc pc, void *pc_ctx, char const *format,
va_list vlist) NPF_PRINTF_ATTR(3, 0);

#ifdef __cplusplus
}
#endif

#endif // NANOPRINTF_H_INCLUDED

/* The implementation of nanoprintf begins here, to be compiled only if
Expand Down Expand Up @@ -1151,6 +1155,3 @@ int npf_vsnprintf(char *buffer, size_t bufsz, char const *format, va_list vlist)
#endif // NANOPRINTF_IMPLEMENTATION_INCLUDED
#endif // NANOPRINTF_IMPLEMENTATION

#ifdef __cplusplus
}
#endif

0 comments on commit d89963a

Please sign in to comment.