Skip to content

Commit

Permalink
executor: Use STATIC_ASSERT in converter.c
Browse files Browse the repository at this point in the history
  • Loading branch information
ZyX-I committed Apr 2, 2015
1 parent 07e92e4 commit 069e09d
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/nvim/viml/executor/converter.c
Expand Up @@ -7,6 +7,7 @@
#include "nvim/api/private/helpers.h"
#include "nvim/func_attr.h"
#include "nvim/memory.h"
#include "nvim/assert.h"

#include "nvim/viml/executor/converter.h"
#include "nvim/viml/executor/executor.h"
Expand All @@ -17,8 +18,8 @@

#define NLUA_PUSH_IDX(lstate, type, idx) \
do { \
/* FIXME Use STATIC_ASSERT */ \
assert(sizeof(type) == sizeof(lua_Number)); \
STATIC_ASSERT(sizeof(type) == sizeof(lua_Number), \
"Number sizes do not match"); \
union { \
type src; \
lua_Number tgt; \
Expand All @@ -29,8 +30,8 @@

#define NLUA_POP_IDX(lstate, type, stack_idx, idx) \
do { \
/* FIXME Use STATIC_ASSERT */ \
assert(sizeof(type) == sizeof(lua_Number)); \
STATIC_ASSERT(sizeof(type) == sizeof(lua_Number), \
"Number sizes do not match"); \
union { \
type tgt; \
lua_Number src; \
Expand Down

0 comments on commit 069e09d

Please sign in to comment.