From 773d84acaf6488042309b2f53a9a64c98854032a Mon Sep 17 00:00:00 2001 From: Bernhard Liebl Date: Wed, 8 Aug 2018 07:21:54 +0200 Subject: [PATCH] Add option for cpp symbol export --- src/nanosvg.h | 4 ++++ src/nanosvgrast.h | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/src/nanosvg.h b/src/nanosvg.h index 1b1d3a3..33fe706 100644 --- a/src/nanosvg.h +++ b/src/nanosvg.h @@ -29,9 +29,11 @@ #ifndef NANOSVG_H #define NANOSVG_H +#ifndef NANOSVG_CPLUSPLUS #ifdef __cplusplus extern "C" { #endif +#endif // NanoSVG is a simple stupid single-header-file SVG parse. The output of the parser is a list of cubic bezier shapes. // @@ -173,9 +175,11 @@ NSVGpath* nsvgDuplicatePath(NSVGpath* p); // Deletes an image. void nsvgDelete(NSVGimage* image); +#ifndef NANOSVG_CPLUSPLUS #ifdef __cplusplus } #endif +#endif #endif // NANOSVG_H diff --git a/src/nanosvgrast.h b/src/nanosvgrast.h index 43c2759..b740c31 100644 --- a/src/nanosvgrast.h +++ b/src/nanosvgrast.h @@ -25,9 +25,11 @@ #ifndef NANOSVGRAST_H #define NANOSVGRAST_H +#ifndef NANOSVGRAST_CPLUSPLUS #ifdef __cplusplus extern "C" { #endif +#endif typedef struct NSVGrasterizer NSVGrasterizer; @@ -64,9 +66,11 @@ void nsvgRasterize(NSVGrasterizer* r, void nsvgDeleteRasterizer(NSVGrasterizer*); +#ifndef NANOSVGRAST_CPLUSPLUS #ifdef __cplusplus } #endif +#endif #endif // NANOSVGRAST_H