mirror of
https://github.com/neovim/neovim.git
synced 2025-09-21 18:58:18 +00:00
buffer: Hide one of the asserts from lua parser
This commit is contained in:
@@ -96,7 +96,10 @@ static inline void buf_set_changedtick(buf_T *const buf, const int changedtick)
|
||||
assert(changedtick_di != NULL);
|
||||
assert(changedtick_di->di_tv.v_type == VAR_NUMBER);
|
||||
assert(changedtick_di->di_tv.v_lock == VAR_FIXED);
|
||||
// For some reason formatc does not like the below.
|
||||
# ifndef UNIT_TESTING_LUA_PREPROCESSING
|
||||
assert(changedtick_di->di_flags == (DI_FLAGS_RO|DI_FLAGS_FIX));
|
||||
# endif
|
||||
assert(changedtick_di == (dictitem_T *)&buf->changedtick_di);
|
||||
assert(&buf->b_changedtick == &buf->changedtick_di.di_tv.vval.v_number);
|
||||
#endif
|
||||
|
@@ -79,6 +79,13 @@ local function cimport(...)
|
||||
|
||||
-- format it (so that the lines are "unique" statements), also filter out
|
||||
-- Objective-C blocks
|
||||
if os.getenv('NVIM_TEST_PRINT_I') == '1' then
|
||||
local lnum = 0
|
||||
for line in body:gmatch('[^\n]+') do
|
||||
lnum = lnum + 1
|
||||
print(lnum, line)
|
||||
end
|
||||
end
|
||||
body = formatc(body)
|
||||
body = filter_complex_blocks(body)
|
||||
|
||||
|
@@ -124,6 +124,7 @@ function Gcc:init_defines()
|
||||
self:define('_GNU_SOURCE')
|
||||
self:define('INCLUDE_GENERATED_DECLARATIONS')
|
||||
self:define('UNIT_TESTING')
|
||||
self:define('UNIT_TESTING_LUA_PREPROCESSING')
|
||||
-- Needed for FreeBSD
|
||||
self:define('_Thread_local', nil, '')
|
||||
-- Needed for macOS Sierra
|
||||
|
Reference in New Issue
Block a user