aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/api/buffer.c
Commit message (Collapse)AuthorAge
...
* api: unify string conversions, simplify interopNicolas Hillegeer2014-06-08
| | | | | | | | | | | | | - The data member of String's can now be passed directly to functions expecting C strings, as we now guarantee that they are NUL-terminated. This obviates the need to use xstrndup and free, simplifying code and enhancing performance. - Use xmemdupz instead of xstrndup for converting String's into C strings. It's faster because it doesn't calculate strlen(string.data) (which is unnecesary as that information is already provided in string.size anyway). - Use cstr_to_string to convert from C strings to String, it is both shorter and faster than the usual strlen/xstrndup combo, which calls strlen twice. cstr_to_string internally calls strlen and then xmemdupz.
* Add automatic generation of headersZyX2014-06-02
| | | | | | | | | | | | | | | | | - 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.
* Move documentation from function declarations to definitionsZyX2014-06-02
| | | | Uses a perl script to move it (scripts/movedocs.pl)
* Initialize Object, PositionJustin M. Keyes2014-05-31
| | | | | fix #778 thanks @genisaguilar
* Extract cursor.h from misc{1,2}.h and memline.hHinidu2014-05-28
|
* API: Bugfix: Remove possible double-free in buffer_get_lineThiago de Arruda2014-05-28
|
* API: Bugfix: Remove memory leak from buffer_get_lineThiago de Arruda2014-05-26
|
* API: Bugfix: Remove memory leak from buffer_set_nameThiago de Arruda2014-05-26
|
* API: Bugfix: Remove memory leak from buffer_set_sliceThiago de Arruda2014-05-26
|
* API: Refactor: Duplicate/free string arguments coming from msgpackThiago de Arruda2014-05-26
| | | | | | | | | When receiving strings *from* msgpack, we don't need to duplicate/free since the data only lives in the msgpack parse buffer until the end of the call. But in order to reuse `msgpack_rpc_free_object` when sending event data(which is sent *to* msgpack), Strings must be freed, which means they must also be allocated separately.
* API: Refactor: Fix buffer_get_markThiago de Arruda2014-05-23
|
* API: Refactor: Use macro for initializing all arraysThiago de Arruda2014-05-23
|
* API: Refactor: Implement buffer_get_numberThiago de Arruda2014-05-23
|
* API: Refactor: Move non-public files to private subdirectoryThiago de Arruda2014-05-23
|
* API: Bugfix: Remove wrong increment statement from buffer_set_sliceThiago de Arruda2014-05-23
|
* API: Bugfix: Check that error isn't set in buffer_get_lineThiago de Arruda2014-05-23
|
* API: Cleanup: Remove unnecessary NULL checksThiago de Arruda2014-05-23
|
* api/helpers: implement C string to String helperNicolas Hillegeer2014-05-18
| | | | Use it in buffers.c
* Replace unnecessary `xcalloc` call by `xmalloc`Thiago de Arruda2014-05-17
|
* Enable -Wconversion for API files and fix errorsThiago de Arruda2014-05-17
|
* Use more descriptive names for API primitive typesThiago de Arruda2014-05-17
| | | | | | | | | Instead of exposing native C types to a public API that can be consumed by other platforms, we are now using the following translation: int64_t -> Integer double -> Float bool -> Boolean
* Introduce nvim namespace: Fix project-local includes.Eliseo Martínez2014-05-15
| | | | Prepend 'nvim/' in all project-local (non-system) includes.
* Introduce nvim namespace: Fix relative includes.Eliseo Martínez2014-05-15
| | | | | | | | | | Problem: Some newly introduced files used includes relative to the current file, both of the form `include "../XXX.h"` and `include "XXX.h"`. Preferred form is relative to include root (src/ in our case). Solution: Change includes to preferred form. Note: This is also done to ease next commit (prepend 'nvim/ to all project-local includes).
* Introduce nvim namespace: Move files.Eliseo Martínez2014-05-15
Move files from src/ to src/nvim/. - src/nvim/ becomes the new root dir for nvim executable sources. - src/libnvim/ is planned to become root dir of the neovim library.