Added 'extern "C"' directives to make the C header file usable in C++ code.

This commit is contained in:
Project Nayuki 2017-05-07 21:51:08 +00:00
parent 17e0155500
commit 5d1069a93c
1 changed files with 8 additions and 0 deletions

View File

@ -76,6 +76,10 @@ enum qrcodegen_Mask {
/*---- Functions to generate QR Codes ----*/ /*---- 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. * 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 * 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. * If the given coordinates are out of bounds, then false (white) is returned.
*/ */
bool qrcodegen_getModule(const uint8_t qrcode[], int x, int y); bool qrcodegen_getModule(const uint8_t qrcode[], int x, int y);
#ifdef __cplusplus
}
#endif