buffer data vs payload app compat fix (#854)

* buffer data vs payload app compat fix

* added PXT_MICROBIT_TAGGED_INT
This commit is contained in:
Peli de Halleux 2018-06-04 14:37:26 -07:00 committed by GitHub
parent c9b269e2ce
commit 56252de874
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -7,6 +7,14 @@
#pragma GCC diagnostic ignored "-Wformat"
#pragma GCC diagnostic ignored "-Warray-bounds"
// helpful define to handle C++ differences in package
#define PXT_MICROBIT_TAGGED_INT 1
// cross version compatible way of access data field
#ifndef PXT_BUFFER_DATA
#define PXT_BUFFER_DATA(buffer) buffer->data
#endif
// needed for gcc6; not sure why
#undef min
#undef max