<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rneovim.git/src/nvim/os, branch mix_20240309</title>
<subtitle>Neovim fork with Rahm's personal hacks.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/'/>
<entry>
<title>vim-patch:8.2.5077: various warnings from clang on MS-Windows (#27773)</title>
<updated>2024-03-08T05:56:27+00:00</updated>
<author>
<name>zeertzjq</name>
<email>zeertzjq@outlook.com</email>
</author>
<published>2024-03-08T05:56:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=6a580b997b9f8124d23ca6c87a47b4fec2e3e9e7'/>
<id>6a580b997b9f8124d23ca6c87a47b4fec2e3e9e7</id>
<content type='text'>
Problem:    Various warnings from clang on MS-Windows.
Solution:   Avoid the warnings. (Yegappan Lakshmanan, closes vim/vim#10553)

https://github.com/vim/vim/commit/a34b4460c2843c67a35a2d236b01e6cb9bc38734

Co-authored-by: Yegappan Lakshmanan &lt;yegappan@yahoo.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:    Various warnings from clang on MS-Windows.
Solution:   Avoid the warnings. (Yegappan Lakshmanan, closes vim/vim#10553)

https://github.com/vim/vim/commit/a34b4460c2843c67a35a2d236b01e6cb9bc38734

Co-authored-by: Yegappan Lakshmanan &lt;yegappan@yahoo.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>fix(process): avoid potential data race on exit (#27769)</title>
<updated>2024-03-08T01:18:03+00:00</updated>
<author>
<name>zeertzjq</name>
<email>zeertzjq@outlook.com</email>
</author>
<published>2024-03-08T01:18:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=d0b3c872192152d5b09a92e53e3986b9fe64a3d9'/>
<id>d0b3c872192152d5b09a92e53e3986b9fe64a3d9</id>
<content type='text'>
On exit, pty_process_close() may be called after pty_process_finish1()
but before start_wait_eof_timer(), in which case the timer shouldn't be
started because pty_process_close() has already closed it.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
On exit, pty_process_close() may be called after pty_process_finish1()
but before start_wait_eof_timer(), in which case the timer shouldn't be
started because pty_process_close() has already closed it.</pre>
</div>
</content>
</entry>
<entry>
<title>fix(process): close handles and timer in pty_process_close() (#27760)</title>
<updated>2024-03-07T10:05:55+00:00</updated>
<author>
<name>zeertzjq</name>
<email>zeertzjq@outlook.com</email>
</author>
<published>2024-03-07T10:05:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=3e569d440b8e5a2b190a7013081d29cb7e04af01'/>
<id>3e569d440b8e5a2b190a7013081d29cb7e04af01</id>
<content type='text'>
This should prevent use-after-free on exit on Windows.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This should prevent use-after-free on exit on Windows.</pre>
</div>
</content>
</entry>
<entry>
<title>refactor(metadata): generate all metadata in lua</title>
<updated>2024-02-28T10:00:38+00:00</updated>
<author>
<name>bfredl</name>
<email>bjorn.linse@gmail.com</email>
</author>
<published>2024-02-26T17:00:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=de5cf09cf98e20d8d3296ad6933ff2741acf83f7'/>
<id>de5cf09cf98e20d8d3296ad6933ff2741acf83f7</id>
<content type='text'>
Then we can just load metadata in C as a single msgpack blob. Which also
can be used directly as binarly data, instead of first unpacking all the
functions and ui_events metadata to immediately pack it again, which was
a bit of a silly walk (and one extra usecase of `msgpack_rpc_from_object`
which will get yak shaved in the next PR)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Then we can just load metadata in C as a single msgpack blob. Which also
can be used directly as binarly data, instead of first unpacking all the
functions and ui_events metadata to immediately pack it again, which was
a bit of a silly walk (and one extra usecase of `msgpack_rpc_from_object`
which will get yak shaved in the next PR)
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge pull request #27599 from bfredl/nofilealloc</title>
<updated>2024-02-26T13:43:42+00:00</updated>
<author>
<name>bfredl</name>
<email>bjorn.linse@gmail.com</email>
</author>
<published>2024-02-26T13:43:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=7038fdeee2561ef29bd41e3f5ac54823c76d8143'/>
<id>7038fdeee2561ef29bd41e3f5ac54823c76d8143</id>
<content type='text'>
refactor(fileio): remove API shell layer encouraging unnecessary allocations</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
refactor(fileio): remove API shell layer encouraging unnecessary allocations</pre>
</div>
</content>
</entry>
<entry>
<title>fix(process): start pty process eof timer on main thread (#27625)</title>
<updated>2024-02-26T01:47:49+00:00</updated>
<author>
<name>zeertzjq</name>
<email>zeertzjq@outlook.com</email>
</author>
<published>2024-02-26T01:47:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=268066e01400f55b0c38716f0d6ee3dece10c43e'/>
<id>268066e01400f55b0c38716f0d6ee3dece10c43e</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>refactor(fileio): remove API shell layer encouraging unnecessary allocations</title>
<updated>2024-02-25T10:20:06+00:00</updated>
<author>
<name>bfredl</name>
<email>bjorn.linse@gmail.com</email>
</author>
<published>2024-02-24T09:17:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=77e928fd3e92f35182237b663437d7ebde7ebde7'/>
<id>77e928fd3e92f35182237b663437d7ebde7ebde7</id>
<content type='text'>
Functions like file_open_new() and file_open_fd_new() which just is a
wrapper around the real functions but with an extra xmalloc/xfree around
is an anti-pattern. If the caller really needs to allocate a
FileDescriptor as a heap object, it can do that directly.

FileDescriptor by itself is pretty much a pointer, or rather two:
the OS fd index and a pointer to a buffer. So most of the time an extra
pointer layer is just wasteful.

In the case of scriptin[curscript] in getchar.c, curscript used
to mean in practice:

N+1 open scripts           when curscript&gt;0
zero or one open scripts   when curscript==0

Which means scriptin[0] had to be compared to NULL to disambiguate the
curscript=0 case.

Instead, use curscript==-1 to mean that are no script,
then all pointer comparisons dissappear and we can just use an array of
structs without extra pointers.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Functions like file_open_new() and file_open_fd_new() which just is a
wrapper around the real functions but with an extra xmalloc/xfree around
is an anti-pattern. If the caller really needs to allocate a
FileDescriptor as a heap object, it can do that directly.

FileDescriptor by itself is pretty much a pointer, or rather two:
the OS fd index and a pointer to a buffer. So most of the time an extra
pointer layer is just wasteful.

In the case of scriptin[curscript] in getchar.c, curscript used
to mean in practice:

N+1 open scripts           when curscript&gt;0
zero or one open scripts   when curscript==0

Which means scriptin[0] had to be compared to NULL to disambiguate the
curscript=0 case.

Instead, use curscript==-1 to mean that are no script,
then all pointer comparisons dissappear and we can just use an array of
structs without extra pointers.
</pre>
</div>
</content>
</entry>
<entry>
<title>perf(os/env): os_getenv() allocation when there is no env var set</title>
<updated>2024-02-24T08:30:21+00:00</updated>
<author>
<name>bfredl</name>
<email>bjorn.linse@gmail.com</email>
</author>
<published>2024-02-21T09:49:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=c5990f2cdca5c16074d8d31fd595babe64c8dc94'/>
<id>c5990f2cdca5c16074d8d31fd595babe64c8dc94</id>
<content type='text'>
os_getenv("FOO") caches the result when $FOO is set to something
non-empty. However, when $FOO was not set, every new call to
os_getenv("FOO") would allocate a temporary scratch buffer to
immediately throw away.

This has an huge impact e.g. on logging which depends on potentially
non-set env vars.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
os_getenv("FOO") caches the result when $FOO is set to something
non-empty. However, when $FOO was not set, every new call to
os_getenv("FOO") would allocate a temporary scratch buffer to
immediately throw away.

This has an huge impact e.g. on logging which depends on potentially
non-set env vars.
</pre>
</div>
</content>
</entry>
<entry>
<title>refactor(api): use arena for channel info and terminal info</title>
<updated>2024-02-18T09:36:07+00:00</updated>
<author>
<name>bfredl</name>
<email>bjorn.linse@gmail.com</email>
</author>
<published>2024-02-17T19:33:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=146333ca123ab85397eb089345569cd9ed2d405a'/>
<id>146333ca123ab85397eb089345569cd9ed2d405a</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>refactor(api): make cstr_as_string accept "const char*"</title>
<updated>2024-02-09T14:11:21+00:00</updated>
<author>
<name>bfredl</name>
<email>bjorn.linse@gmail.com</email>
</author>
<published>2024-02-09T10:42:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=e0e5b7f0ba1b0440bdc2b557e2b2cfae24706cbd'/>
<id>e0e5b7f0ba1b0440bdc2b557e2b2cfae24706cbd</id>
<content type='text'>
In the context a String inside an Object/Dictionary etc is consumed,
it is considered to be read-only.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In the context a String inside an Object/Dictionary etc is consumed,
it is considered to be read-only.
</pre>
</div>
</content>
</entry>
</feed>
