Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

address low-hanging fruit in port to libuv #115

Closed
wants to merge 4 commits into from

Conversation

Projects
None yet
5 participants
@rjw57
Copy link
Contributor

rjw57 commented Feb 24, 2014

As noted in #3, os_unix.c will eventually be ported to libuv. Grab the low-hanging fruit for that task by using the exact like-for-like functionality provided by libuv which can be used to replace some code in os_unix.c. Specifically mch_chdir() and mch_total_mem().

The longest journey begins with the smallest step :).

@scott-linder

This comment has been minimized.

Copy link
Contributor

scott-linder commented Feb 24, 2014

👍 "+5 −99" if things continue at this rate libuv will shorten the codebase significantly.

@tarruda

This comment has been minimized.

Copy link
Member

tarruda commented Feb 24, 2014

@rjw57 great initiative, could you move those out of os_unix into a separate module(eg: io.c like I did on the other branch). This should make it easier to see what was already moved out of os_unix.c

Later I will integrate my changes in this module too

@Coornail

This comment has been minimized.

Copy link
Contributor

Coornail commented Feb 24, 2014

Looks cool!

move libuv functions to os.c and io.c module
Despite being an io library, the functions currently implemented with
libuv include some non-I/O tasks like getting the total amount of
memory.
@rjw57

This comment has been minimized.

Copy link
Contributor Author

rjw57 commented Feb 24, 2014

@tarruda Done. I've actually added an os.c module as well since I don't think mch_total_mem() really belongs in a file called io.c.

@rjw57

This comment has been minimized.

Copy link
Contributor Author

rjw57 commented Feb 24, 2014

Note that I've not touched the src/proto files since, AIUI, these are no-longer automatically generated? As such I don't really know what the plan is for re-factoring in this case.

@tarruda

This comment has been minimized.

Copy link
Member

tarruda commented Feb 25, 2014

Merged. thanks

@tarruda tarruda closed this Feb 25, 2014

@rjw57 rjw57 deleted the rjw57:libuv-low-hanging-fruit branch Feb 25, 2014

@ooxi

This comment has been minimized.

Copy link

ooxi commented on src/os_unix.c in d9066ab Feb 28, 2014

This is probably just an opinion but using uv_get_total_memory() / 1024 instead of uv_get_total_memory() >> 10 is more readable for the average programmer. And the compiler will emit the same instructions anyway :)

dwb pushed a commit to dwb/neovim that referenced this pull request Feb 21, 2017

Merge pull request neovim#115 from languitar/rst
Add linters for reStructured Text
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.