Skip to content

Commit

Permalink
Minor update to counter macro testing
Browse files Browse the repository at this point in the history
  • Loading branch information
edo9300 committed Mar 9, 2024
1 parent 31f98de commit f5d7764
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions function_array_helper.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
#define MAKE_LUA_NAME_IMPL(module, name) c_lua_##module##_##name
#define MAKE_LUA_NAME(module, name) MAKE_LUA_NAME_IMPL(module, name)

// if subsequent calls to __COUNTER__ produce the same result, that macro is broken
#if !defined(__COUNTER__) || (__COUNTER__ + 0 == __COUNTER__ + 0)
// if subsequent calls to __COUNTER__ don't produce consecutive integers, that macro is broken
#if !defined(__COUNTER__) || (__COUNTER__ + 0 != __COUNTER__ - 1)
#define HAS_COUNTER 0
#else
#define HAS_COUNTER 1
Expand Down

0 comments on commit f5d7764

Please sign in to comment.