Merge branch 'feature/linenoise-ng' of git://github.com/dtzWill/nix

This commit is contained in:
Shea Levy 2017-12-11 07:52:20 -05:00
commit 5ba5ca7888
No known key found for this signature in database
GPG key ID: 5C0BD6957D86FE27
10 changed files with 4578 additions and 1260 deletions

View file

@ -2,7 +2,7 @@ programs += nix
nix_DIR := $(d)
nix_SOURCES := $(wildcard $(d)/*.cc) src/linenoise/linenoise.c
nix_SOURCES := $(wildcard $(d)/*.cc) $(wildcard src/linenoise/*.cpp)
nix_LIBS = libexpr libmain libstore libutil libformat

View file

@ -185,7 +185,7 @@ void NixRepl::mainLoop(const std::vector<std::string> & files)
bool NixRepl::getLine(string & input, const std::string &prompt)
{
char * s = linenoise(prompt.c_str());
Finally doFree([&]() { linenoiseFree(s); });
Finally doFree([&]() { free(s); });
if (!s) return false;
input += s;
return true;