资源简介
lua_cjson 在windows 平台的编译工程,找了很多都没有,下载没有积分,只好自己动手了,测试通过的,里面包含了lua_cjson 的源码,解压后进入目录,build 文件夹下的 sln 解决方案,打开即可,也有已经生成的 cjson.lib 和 cjson.dll., 把 cjson.dll copy 到 lua.exe 同级目录下,require("cjson") 测试可用
代码片段和文件信息
/****************************************************************
*
* The author of this software is David M. Gay.
*
* Copyright (c) 1991 2000 2001 by Lucent Technologies.
*
* Permission to use copy modify and distribute this software for any
* purpose without fee is hereby granted provided that this entire notice
* is included in all copies of any software which is or includes a copy
* or modification of this software and in all copies of the supporting
* documentation for such software.
*
* THIS SOFTWARE IS BEING PROVIDED “AS IS“ WITHOUT ANY EXPRESS OR IMPLIED
* WARRANTY. IN PARTICULAR NEITHER THE AUTHOR NOR LUCENT MAKES ANY
* REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY
* OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE.
*
***************************************************************/
/* Please send bug reports to David M. Gay (dmg at acm dot org
* with “ at “ changed at “@“ and “ dot “ changed to “.“). */
/* On a machine with IEEE extended-precision registers it is
* necessary to specify double-precision (53-bit) rounding precision
* before invoking strtod or dtoa. If the machine uses (the equivalent
* of) Intel 80x87 arithmetic the call
* _control87(PC_53 MCW_PC);
* does this with many compilers. Whether this or another call is
* appropriate depends on the compiler; for this to work it may be
* necessary to #include “float.h“ or another system-dependent header
* file.
*/
/* strtod for IEEE- VAX- and IBM-arithmetic machines.
*
* This strtod returns a nearest machine number to the input decimal
* string (or sets errno to ERANGE). With IEEE arithmetic ties are
* broken by the IEEE round-even rule. Otherwise ties are broken by
* biased rounding (add half and chop).
*
* Inspired loosely by William D. Clinger‘s paper “How to Read Floating
* Point Numbers Accurately“ [Proc. ACM SIGPLAN ‘90 pp. 92-101].
*
* Modifications:
*
* 1. We only require IEEE IBM or VAX double-precision
* arithmetic (not IEEE double-extended).
* 2. We get by with floating-point arithmetic in a case that
* Clinger missed -- when we‘re computing d * 10^n
* for a small integer d and the integer n is not too
* much larger than 22 (the maximum integer k for which
* we can represent 10^k exactly) we may be able to
* compute (d*10^k) * 10^(e-k) with just one roundoff.
* 3. Rather than a bit-at-a-time adjustment of the binary
* result in the hard case we use floating-point
* arithmetic to determine the adjustment to within
* one bit; only in really hard cases do we need to
* compute a second residual.
* 4. Because of 3. we don‘t need a large table of powers of 10
* for ten-to-e (just some small tables e.g. of 10^k
* for 0 <= k <= 22).
*/
/*
* #define IEEE_8087 for IEEE-arithmetic machines where the least
* significant byte has the lowest address.
* #define IEEE_MC68k for IEEE-arithmetic machines where the most
* significant byte has the lowest ad相关资源
- VS2010、VS2012、VS2013代码自动注释插件
- 通过x264录制RGB屏幕视频vs2013工程,
- FFmpeg-3.1 windows vs2013编译动态库静态库
- 使用ffmpeg将多张图片生成H264裸流并获
- ffmpeg-vs2013
- ffmpeg-4.0.2最新版 windows vs2013编译动态
- .Net Reflector 8.2.0.42破解版 支持vs2013
- OpenCV3.3+contrib-master,VS2013编译后的l
- VS2013生成并调用DLL的封装教程内和教
- OpenGL立方体在世界坐标系中缩放_旋转
- vs2013扫雷程序
- QT+VS点击按钮弹出新窗口的实现
- halcon引擎例程_vs2013_halcon19_11.rar
- NuGet4vs2013
- 支持vs2010/2012/2013 的svn插件 AnkhSvn_2.
- 基于Win10和VS2013-VS2019的比特币源码(
- 智能电子钢琴 vs2013 C
- vs2013配置+gsl-1.8-src+gsl-1.8两个exe文件以
- libyuv vs2013工程
- vs2013编译好的OpenSSL_1_0_2静态库和动态
- 可以在osg3.4+osgEarth2.8中使用的64位VP
- openblas vs2013 x64 库dll和lib
- live555通过VS2013编译,自己整理的,附
- vs2013\\vs2015软件卸载后,清除系统盘的
- 使用cJson在乐鑫 esp8266 如何解析一段
- libssh2_lib [vs2013 x 86]
- kinect2_SDK_深度图到RGB的映射
- DevComponents.DotNetBar2源码 VS2013全工程
- cximage600_full在VS2013编译的库
- vs2013编译好的soil库,内含lib库
川公网安备 51152502000135号
评论
共有 条评论