mirror of
https://github.com/neovim/neovim.git
synced 2025-10-17 15:21:47 +00:00
test/helpers: allow interning Pascal strings
os_system() returns a Pascal string, for example (it also NUL-terminates the string, but that's neither here nor there).
This commit is contained in:

committed by
Thiago de Arruda

parent
ad4c1e1954
commit
1cfc468e5c
@@ -88,9 +88,9 @@ cimport './src/nvim/types.h'
|
||||
|
||||
-- take a pointer to a C-allocated string and return an interned
|
||||
-- version while also freeing the memory
|
||||
internalize = (cdata) ->
|
||||
internalize = (cdata, len) ->
|
||||
ffi.gc cdata, ffi.C.free
|
||||
return ffi.string cdata
|
||||
return ffi.string cdata, len
|
||||
|
||||
cstr = ffi.typeof 'char[?]'
|
||||
|
||||
|
Reference in New Issue
Block a user