mirror of
https://github.com/janet-lang/janet
synced 2024-11-24 17:27:18 +00:00
Fix makefile and add json doc.
This commit is contained in:
parent
4d119e4e03
commit
aa8384488c
4
Makefile
4
Makefile
@ -35,6 +35,7 @@ CFLAGS=-std=c99 -Wall -Wextra -Isrc/include -fpic -O2 -fvisibility=hidden \
|
||||
CLIBS=-lm -ldl
|
||||
JANET_TARGET=janet
|
||||
JANET_LIBRARY=libjanet.so
|
||||
JANET_PATH?=/usr/local/lib/janet
|
||||
DEBUGGER=gdb
|
||||
|
||||
UNAME:=$(shell uname -s)
|
||||
@ -180,7 +181,8 @@ install: $(JANET_TARGET)
|
||||
$(LDCONFIG)
|
||||
|
||||
install-libs: natives
|
||||
cp lib/* $(JANET_PATH)
|
||||
mkdir -p $(JANET_PATH)
|
||||
cp -r lib $(JANET_PATH)
|
||||
cp natives/*/*.so $(JANET_PATH)
|
||||
|
||||
uninstall:
|
||||
|
@ -588,8 +588,14 @@ static int json_encode(JanetArgs args) {
|
||||
/****************/
|
||||
|
||||
static const JanetReg cfuns[] = {
|
||||
{"encode", json_encode},
|
||||
{"decode", json_decode},
|
||||
{"encode", json_encode,
|
||||
"(json.encode x)\n\n"
|
||||
"Encodes a janet value in JSON (utf-8)."
|
||||
},
|
||||
{"decode", json_decode,
|
||||
"(json.decode json-source)\n\n"
|
||||
"Returns a janet object after parsing JSON."
|
||||
},
|
||||
{NULL, NULL}
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user