Fully fixed C library code to be compilable in C++ mode (polyglot).
This commit is contained in:
parent
ce58036cb2
commit
88cc1c05fd
|
@ -27,10 +27,16 @@
|
|||
#include <string.h>
|
||||
#include "qrcodegen.h"
|
||||
|
||||
#ifdef QRCODEGEN_TEST
|
||||
#define testable // Expose private functions
|
||||
#else
|
||||
#ifndef QRCODEGEN_TEST
|
||||
#define testable static // Keep functions private
|
||||
#else
|
||||
// Expose private functions
|
||||
#ifndef __cplusplus
|
||||
#define testable
|
||||
#else
|
||||
// Needed for const variables because they are treated as implicitly 'static' in C++
|
||||
#define testable extern
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
|
|
|
@ -77,10 +77,6 @@ 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
|
||||
|
@ -144,7 +140,3 @@ 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
|
||||
|
|
Loading…
Reference in New Issue