From 880957ad4e3fc0ff681025f5e29c5eccf797c564 Mon Sep 17 00:00:00 2001 From: ZyX Date: Sat, 10 May 2014 00:53:36 +0400 Subject: Move documentation from function declarations to definitions Uses a perl script to move it (scripts/movedocs.pl) --- src/nvim/os/uv_helpers.h | 24 ------------------------ 1 file changed, 24 deletions(-) (limited to 'src/nvim/os/uv_helpers.h') diff --git a/src/nvim/os/uv_helpers.h b/src/nvim/os/uv_helpers.h index 03fd64457f..ea797ba9f0 100644 --- a/src/nvim/os/uv_helpers.h +++ b/src/nvim/os/uv_helpers.h @@ -7,40 +7,16 @@ #include "nvim/os/rstream_defs.h" #include "nvim/os/job_defs.h" -/// Gets the RStream instance associated with a libuv handle -/// -/// @param handle libuv handle -/// @return the RStream pointer RStream *handle_get_rstream(uv_handle_t *handle); -/// Associates a RStream instance with a libuv handle -/// -/// @param handle libuv handle -/// @param rstream the RStream pointer void handle_set_rstream(uv_handle_t *handle, RStream *rstream); -/// Gets the WStream instance associated with a libuv handle -/// -/// @param handle libuv handle -/// @return the WStream pointer WStream *handle_get_wstream(uv_handle_t *handle); -/// Associates a WStream instance with a libuv handle -/// -/// @param handle libuv handle -/// @param wstream the WStream pointer void handle_set_wstream(uv_handle_t *handle, WStream *wstream); -/// Gets the Job instance associated with a libuv handle -/// -/// @param handle libuv handle -/// @return the Job pointer Job *handle_get_job(uv_handle_t *handle); -/// Associates a Job instance with a libuv handle -/// -/// @param handle libuv handle -/// @param job the Job pointer void handle_set_job(uv_handle_t *handle, Job *job); #endif // NVIM_OS_UV_HELPERS_H -- cgit From 70929f7e1616bab2783cc5735c6061981cda8a0f Mon Sep 17 00:00:00 2001 From: ZyX Date: Sat, 10 May 2014 17:24:13 +0400 Subject: Add automatic generation of headers - The 'stripdecls.py' script replaces declarations in all headers by includes to generated headers. `ag '#\s*if(?!ndef NEOVIM_).*((?!#\s*endif).*\n)*#ifdef INCLUDE_GENERATED'` was used for this. - Add and integrate gendeclarations.lua into the build system to generate the required includes. - Add -Wno-unused-function - Made a bunch of old-style definitions ANSI This adds a requirement: all type and structure definitions must be present before INCLUDE_GENERATED_DECLARATIONS-protected include. Warning: mch_expandpath (path.h.generated.h) was moved manually. So far it is the only exception. --- src/nvim/os/uv_helpers.h | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) (limited to 'src/nvim/os/uv_helpers.h') diff --git a/src/nvim/os/uv_helpers.h b/src/nvim/os/uv_helpers.h index ea797ba9f0..b49656bcb8 100644 --- a/src/nvim/os/uv_helpers.h +++ b/src/nvim/os/uv_helpers.h @@ -7,17 +7,7 @@ #include "nvim/os/rstream_defs.h" #include "nvim/os/job_defs.h" -RStream *handle_get_rstream(uv_handle_t *handle); - -void handle_set_rstream(uv_handle_t *handle, RStream *rstream); - -WStream *handle_get_wstream(uv_handle_t *handle); - -void handle_set_wstream(uv_handle_t *handle, WStream *wstream); - -Job *handle_get_job(uv_handle_t *handle); - -void handle_set_job(uv_handle_t *handle, Job *job); - +#ifdef INCLUDE_GENERATED_DECLARATIONS +# include "os/uv_helpers.h.generated.h" +#endif #endif // NVIM_OS_UV_HELPERS_H - -- cgit