From 5d1069a93c27604df18b8a82e8dd861a17a7c6e0 Mon Sep 17 00:00:00 2001 From: Project Nayuki Date: Sun, 7 May 2017 21:51:08 +0000 Subject: [PATCH] Added 'extern "C"' directives to make the C header file usable in C++ code. --- c/qrcodegen.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/c/qrcodegen.h b/c/qrcodegen.h index 478d28c..9b37cee 100644 --- a/c/qrcodegen.h +++ b/c/qrcodegen.h @@ -76,6 +76,10 @@ enum qrcodegen_Mask { /*---- Functions to generate QR Codes ----*/ +#ifdef __cplusplus +extern "C" { +#endif + /* * Encodes the given text string to a QR Code symbol, returning true if encoding succeeded. * If the data is too long to fit in any version in the given range @@ -139,3 +143,7 @@ int qrcodegen_getSize(const uint8_t qrcode[]); * If the given coordinates are out of bounds, then false (white) is returned. */ bool qrcodegen_getModule(const uint8_t qrcode[], int x, int y); + +#ifdef __cplusplus +} +#endif