Skip to content

Commit

Permalink
Bump version number.
Browse files Browse the repository at this point in the history
  • Loading branch information
mbalmer committed Dec 23, 2016
1 parent 84881fd commit 9797280
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 19 deletions.
19 changes: 3 additions & 16 deletions GNUmakefile
Original file line number Diff line number Diff line change
@@ -1,19 +1,6 @@
SRCS= luajson.c
LIB= json
MODULE= json

LUAVER= `lua -v 2>&1 | cut -c 5-7`
CFLAGS+= -D_GNU_SOURCE

CFLAGS+= -O3 -Wall -fPIC -I/usr/include -I/usr/include/lua${LUAVER} \
-D_GNU_SOURCE
LDADD+= -L/usr/lib

LIBDIR= /usr/lib/lua/${LUAVER}

${LIB}.so: ${SRCS:.c=.o}
cc -shared -o ${LIB}.so ${CFLAGS} ${SRCS:.c=.o} ${LDADD}

clean:
rm -f *.o *.so
install:
install -d ${DESTDIR}${LIBDIR}
install ${LIB}.so ${DESTDIR}${LIBDIR}
include lua.module.mk
2 changes: 1 addition & 1 deletion luajson.c
Original file line number Diff line number Diff line change
Expand Up @@ -623,7 +623,7 @@ json_set_info(lua_State *L)
lua_pushliteral(L, "JSON encoder/decoder for Lua");
lua_settable(L, -3);
lua_pushliteral(L, "_VERSION");
lua_pushliteral(L, "json 1.2.10");
lua_pushliteral(L, "json 1.2.11");
lua_settable(L, -3);
}

Expand Down
4 changes: 2 additions & 2 deletions test.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
-- import the json module

require('json')
local json = require('json')

local foo = json.decode([[
{"name" : "lol", "age" : -1.5e+06, "foo" : ["bar", true, null]}
Expand All @@ -14,7 +14,7 @@ print(foo.name) -- lol
print(foo.foo[1]) -- bar
print(foo.foo[2]) -- true
print(foo.foo[3]) -- null
print(foo.foo[3] == json.null) -- true
print(json.isnull(foo.foo[3])) -- true
foo.foox = "omg :D"
foo.theNull = json.null
foo.itIs = true
Expand Down

0 comments on commit 9797280

Please sign in to comment.