Skip to content

Commit

Permalink
Fix MSVC incompatibility (#25)
Browse files Browse the repository at this point in the history
* Fixed MSVC incompatibility

* Bump version to 1.2.1

Co-authored-by: Diego Argueta <620513-dargueta@users.noreply.github.com>
  • Loading branch information
dargueta and Diego Argueta authored Nov 22, 2021
1 parent 7fe7659 commit dcda7e2
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
14 changes: 14 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,20 @@
Changes
=======

1.2.1 (2021-11-21)
------------------

This is functionally identical to 1.2.0 but fixes a compilation problem on
Microsoft Visual C++. Special thanks to `Metaworm <https://github.com/metaworm>`_
for finding this.

Bugfixes
~~~~~~~~

Compilation fails in Visual Studio because of an unguarded use of ``__attribute__``,
which is specific to GCC and GCC-compatible compilers. This release adds a
preprocessor guard to prevent syntax errors.

1.2.0 (2021-08-11)
------------------

Expand Down
2 changes: 1 addition & 1 deletion include/unicornlua/unicornlua.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
/**
* The patch version number of this Lua library (third part, x.x.1).
*/
#define UNICORNLUA_VERSION_PATCH 0
#define UNICORNLUA_VERSION_PATCH 1

/**
* Create a 24-bit number from a release's major, minor, and patch numbers.
Expand Down
2 changes: 2 additions & 0 deletions src/registers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ lua_Number read_float80(const uint8_t *data) {
return static_cast<lua_Number>(sign ? -INFINITY : +INFINITY);

// Significand is non-zero, fall through to next case.
#ifndef _MSC_VER
__attribute__ ((fallthrough));
#endif
case 1:
/* 8087 - 80287 treat this as a signaling NaN, 80387 and later
* treat this as an invalid operand and will explode. Compromise
Expand Down

0 comments on commit dcda7e2

Please sign in to comment.