diff options
-rw-r--r-- | CMakeLists.txt | 6 | ||||
-rw-r--r-- | Makefile | 4 | ||||
-rw-r--r-- | fpconv.h | 2 | ||||
-rw-r--r-- | manual.txt | 2 |
4 files changed, 7 insertions, 7 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index c18381f..5de35db 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt | |||
@@ -7,7 +7,7 @@ project(lua-cjson C) | |||
7 | cmake_minimum_required(VERSION 2.6) | 7 | cmake_minimum_required(VERSION 2.6) |
8 | 8 | ||
9 | option(ENABLE_CJSON_GLOBAL "Register cjson module table as a global variable - not recommended") | 9 | option(ENABLE_CJSON_GLOBAL "Register cjson module table as a global variable - not recommended") |
10 | option(USE_INTERNAL_DTOA "Use internal strtod() / dtoa code for performance") | 10 | option(USE_INTERNAL_FPCONV "Use internal strtod() / g_fmt() code for performance") |
11 | option(MULTIPLE_THREADS | 11 | option(MULTIPLE_THREADS |
12 | "Build internal dtoa with support for multi-threaded applications - recommended" ON) | 12 | "Build internal dtoa with support for multi-threaded applications - recommended" ON) |
13 | 13 | ||
@@ -24,12 +24,12 @@ if(ENABLE_CJSON_GLOBAL) | |||
24 | add_definitions(-DENABLE_CJSON_GLOBAL) | 24 | add_definitions(-DENABLE_CJSON_GLOBAL) |
25 | endif() | 25 | endif() |
26 | 26 | ||
27 | if(NOT USE_INTERNAL_DTOA) | 27 | if(NOT USE_INTERNAL_FPCONV) |
28 | # Use libc number conversion routines (strtod(), sprintf()) | 28 | # Use libc number conversion routines (strtod(), sprintf()) |
29 | set(FPCONV_SOURCES fpconv.c) | 29 | set(FPCONV_SOURCES fpconv.c) |
30 | else() | 30 | else() |
31 | # Use internal number conversion routines | 31 | # Use internal number conversion routines |
32 | add_definitions(-DUSE_INTERNAL_DTOA) | 32 | add_definitions(-DUSE_INTERNAL_FPCONV) |
33 | set(FPCONV_SOURCES g_fmt.c dtoa.c) | 33 | set(FPCONV_SOURCES g_fmt.c dtoa.c) |
34 | 34 | ||
35 | include(TestBigEndian) | 35 | include(TestBigEndian) |
@@ -6,7 +6,7 @@ | |||
6 | ## NaN, Infinity, hex. | 6 | ## NaN, Infinity, hex. |
7 | ## | 7 | ## |
8 | ## Optional built-in number conversion uses the following defines: | 8 | ## Optional built-in number conversion uses the following defines: |
9 | ## USE_INTERNAL_DTOA: Use builtin strtod/dtoa for numeric conversions. | 9 | ## USE_INTERNAL_FPCONV: Use builtin strtod/dtoa for numeric conversions. |
10 | ## IEEE_BIG_ENDIAN: Required on big endian architectures. | 10 | ## IEEE_BIG_ENDIAN: Required on big endian architectures. |
11 | ## MULTIPLE_THREADS: Must be set when Lua CJSON may be used in a | 11 | ## MULTIPLE_THREADS: Must be set when Lua CJSON may be used in a |
12 | ## multi-threaded application. Requries _pthreads_. | 12 | ## multi-threaded application. Requries _pthreads_. |
@@ -54,7 +54,7 @@ LUA_BIN_DIR = $(PREFIX)/bin | |||
54 | 54 | ||
55 | ## Enable built in number conversion | 55 | ## Enable built in number conversion |
56 | #FPCONV_OBJS = g_fmt.o dtoa.o | 56 | #FPCONV_OBJS = g_fmt.o dtoa.o |
57 | #CJSON_CFLAGS += -DUSE_INTERNAL_DTOA | 57 | #CJSON_CFLAGS += -DUSE_INTERNAL_FPCONV |
58 | 58 | ||
59 | ## Compile built in number conversion for big endian architectures | 59 | ## Compile built in number conversion for big endian architectures |
60 | #CJSON_CFLAGS += -DIEEE_BIG_ENDIAN | 60 | #CJSON_CFLAGS += -DIEEE_BIG_ENDIAN |
@@ -6,7 +6,7 @@ | |||
6 | * -1.7976931348623e+308 */ | 6 | * -1.7976931348623e+308 */ |
7 | # define FPCONV_G_FMT_BUFSIZE 32 | 7 | # define FPCONV_G_FMT_BUFSIZE 32 |
8 | 8 | ||
9 | #ifdef USE_INTERNAL_DTOA | 9 | #ifdef USE_INTERNAL_FPCONV |
10 | static inline void fpconv_init() | 10 | static inline void fpconv_init() |
11 | { | 11 | { |
12 | /* Do nothing - not required */ | 12 | /* Do nothing - not required */ |
@@ -133,7 +133,7 @@ converting data number heavy data. However, this option reduces | |||
133 | portability and is disabled by default. | 133 | portability and is disabled by default. |
134 | 134 | ||
135 | [horizontal] | 135 | [horizontal] |
136 | USE_INTERNAL_DTOA:: Enable internal number conversion routines. | 136 | USE_INTERNAL_FPCONV:: Enable internal number conversion routines. |
137 | IEEE_BIG_ENDIAN:: Must be set on big endian architectures. | 137 | IEEE_BIG_ENDIAN:: Must be set on big endian architectures. |
138 | MULTIPLE_THREADS:: Must be set when Lua CJSON may be used in a | 138 | MULTIPLE_THREADS:: Must be set when Lua CJSON may be used in a |
139 | multi-threaded application. Requries _pthreads_. | 139 | multi-threaded application. Requries _pthreads_. |