Commit Graph

1028 Commits

Author SHA1 Message Date
Petri Lehtinen
d8753db4ac Merge pull request #233 from haldean/master
Use snprintf and strncpy in place of sprintf and strcpy

OpenBSD linker nags about using sprintf and strcpy.
2015-04-30 10:43:39 +03:00
Haldean
95dd927857 use snprintf and strncpy in place of sprintf and strcpy
This is both good practice and nice for OpenBSD users, who will no
longer get the nag message to not use sprintf/strcpy every time they
link against jansson. It's worth noting that the existing code seems
safe to me - bounds checks were already happening before the actual
calls - and that this is for extra security.
2015-04-30 00:11:25 -07:00
Petri Lehtinen
76760011ff Don't crash when building documentation man pages
Fixes #207.
2015-03-07 09:14:06 +02:00
Petri Lehtinen
11813f4128 Fix a use after free 2015-02-07 07:36:29 +02:00
Petri Lehtinen
8b1bdcacb7 Merge pull request #221 from lioncash/test
test_object: Fix a duplicate conditional check in test_iterators
2015-02-05 09:28:43 +02:00
Lioncash
c242b46016 test_object: Fix a duplicate conditional check in test_iterators 2015-02-05 01:26:13 -05:00
Petri Lehtinen
58c188e1d5 Merge pull request #217 from JoakimSoderberg/simple_parse_cmake
Compile simple_parse example for CMake project.
2015-01-14 08:05:51 +02:00
Petri Lehtinen
ffc18128f4 Merge pull request #216 from JoakimSoderberg/infinity_warning
Disable warning for deliberate use on MSVS.
2015-01-14 08:04:37 +02:00
Joakim Soderberg
6a38d0d431 Disable warning for deliberate use on MSVS.
Disable "warning C4756: overflow in constant arithmetic" when deliberately
triggering it in a test using infinity.
2015-01-13 16:30:00 +01:00
Joakim Soderberg
d0a8ad4c06 Compile simple_parse example for CMake project. 2015-01-13 16:17:48 +01:00
Petri Lehtinen
c244b1483e examples/README.rst: Fix formatting 2014-12-30 08:56:07 +02:00
Petri Lehtinen
fc83f10c85 Add Makefile.am for examples 2014-12-30 08:50:33 +02:00
Petri Lehtinen
8d561cd94e examples/simple_parse.c: Reindent, fix warnings & style 2014-12-30 08:50:33 +02:00
Petri Lehtinen
970c6988a5 Merge pull request #214 from rdpoor/master
adding simple-parse example
2014-12-30 08:33:34 +02:00
Robert Poor
220dcb7be3 use fgets() rather than getline() 2014-12-29 06:22:19 -08:00
Robert Poor
48e0488f07 adding simple-parse example 2014-12-26 10:49:15 -08:00
Petri Lehtinen
890760b2fb Increase test coverage 2014-12-19 08:35:46 +02:00
Petri Lehtinen
15653c47dd Add a test case for \u0000 2014-12-19 07:57:33 +02:00
Petri Lehtinen
5508ab403d Honor JSON_DECODE_INT_AS_REAL at lexical stage
This has the consequence that numbers are never converted to integers
when JSON_DECODE_INT_AS_REAL is set, and thus it works correctly all
integers that are representable as double.

Fixes #212.
2014-12-18 15:16:14 +02:00
Petri Lehtinen
d799ee11b4 doc: Update the Getting Started chapter
- It's not true anymore that there are no configure options that modify
  Jansson's behaviour

- Remove trailing whitespace
2014-12-18 14:47:08 +02:00
Petri Lehtinen
abaae7630e Make it possible to set initial hashtable size
Fixes #213.
2014-12-18 14:43:44 +02:00
Petri Lehtinen
5c1d87592a wip: add tests 2014-12-15 08:30:59 +02:00
Petri Lehtinen
5885035f5f Add coveralls.io badge to README.rst 2014-12-15 08:14:57 +02:00
Petri Lehtinen
dee4a7c29e Merge pull request #211 from JoakimSoderberg/coveralls
Add support for coverage/coveralls.io in cmake project.
2014-12-15 08:09:13 +02:00
david bigagli
82a55ef205 doc patch for jansson 2014-12-15 07:47:19 +02:00
Joakim Söderberg
19f33c0e71 Add support for coverage/coveralls.io in cmake project.
This adds support for http://coveralls.io/ to the cmake project. This can then be run via a new Travis job, which uploads json containing the coverage data to the website.

To use this, please login usin github at http://coveralls.io/ and enable the Jansson project. You can then get a nice percentage badge for code coverage after each Travis buid. Coveralls will also comment on pull request with coverage info.

To test and run it locally do:

```bash
$ mkdir build && cd build
$ cmake -DJANSSON_COVERALLS=ON -DCMAKE_BUILD_TYPE=Debug ..
$ cmake --build .                      # $ make
$ cmake --build . --target coveralls   # $ make coveralls
```

There is also another script that generates a local HTML page using lcov CodeCoverage.cmake which can be run using

```bash
$ make coverage
```

The required depdencies to run this are:
gcov
curl
lcov (is needed for the normal CodeCoverage script)
2014-12-12 23:57:01 +01:00
Petri Lehtinen
3c9e5c9925 Move the list member to the top of hashtable_pair struct
This may make debugging easier with limited debuggers.
2014-12-10 07:41:41 +02:00
Petri Lehtinen
1c38ab17f5 Include jansson_config.h with quotes
Fixes #209.
2014-12-04 10:45:26 +02:00
Petri Lehtinen
d5edfcc6fd Merge pull request #208 from skeid21/master
Fix warnings on LLVM 6.0 targetion iOS arm64.
2014-11-29 11:52:11 +02:00
Shawn Harris
9b435df3d4 Warnings - use size_t where appropriate to prevent warning when compilation is targeting 64 bit 2014-11-28 18:11:26 -07:00
Petri Lehtinen
bc743ad2d9 README: Documentation is hosted at RTD 2014-10-20 20:27:56 +03:00
Petri Lehtinen
19cc800ad3 Merge pull request #206 from chrullrich/fix-win-build
Fix CMake configuration for Windows build
2014-10-14 12:28:19 +03:00
Christian Ullrich
b52e7a69aa Fix CFLAGS for static-CRT build.
Setting the variables to only "/MT(d)" resets all other flags to their defaults, so the debug build used release flags.
2014-10-13 13:06:02 +02:00
Christian Ullrich
1395e4303a Fix static CRT selection. 2014-10-13 13:04:04 +02:00
Petri Lehtinen
d7a6269a17 Use expr instead of $((...)) in shell scripts
For Solaris 10 compatibility.
2014-10-03 08:49:08 +03:00
Petri Lehtinen
7fbe7c3960 Don't use the nonstandard __FUNCTION__ macro 2014-10-03 08:38:57 +03:00
Petri Lehtinen
ee27b7e3dd jansson 2.7 2014-10-02 13:10:45 +03:00
Petri Lehtinen
391d9101a8 Update CHANGES for 2.7 2014-10-02 08:57:07 +03:00
Petri Lehtinen
2137e0c895 Add AppVeyor badge to README.rst 2014-09-25 07:51:55 +03:00
Petri Lehtinen
5fc44e10aa Merge pull request #205 from JoakimSoderberg/appveyor
Added Windows CI support with appveyor
2014-09-25 07:45:24 +03:00
Joakim Soderberg
b94d767f86 Added Windows CI support with appveyor
Added support for http://www.appveyor.com/ (login via github account).

This will build the project and run the unit tests on Windows as well.
Possible to add a badge like with Travis in the README.md as well.
2014-09-24 18:08:45 +02:00
Petri Lehtinen
43f17d010a Merge pull request #204 from bgoglin/master
Don't use GNU-make specific export for global AM_CFLAGS
2014-08-27 08:02:59 +03:00
Petri Lehtinen
fa20e80860 Parse subnormal numbers correctly
Fixes #202.
2014-08-27 07:59:52 +03:00
Brice Goglin
485c7640a1 Don't use GNU-make specific export for global AM_CFLAGS
Just define it at configure time, it's automatically set in all makefiles.

Fixes #203.
2014-08-26 15:01:13 +02:00
Petri Lehtinen
d4a7de7c11 Android.mk: Add -DHAVE_STDINT_H to LOCAL_CFLAGS
See #200.
2014-07-31 07:50:31 +03:00
Petri Lehtinen
a6229a2d3e doc: Enhance string overview 2014-07-21 08:15:34 +03:00
Petri Lehtinen
abd151f5d7 Merge pull request #198 from Smilex/mem_fix
Fixed cases where file would be opened, but not closed.
2014-07-21 08:09:18 +03:00
Ian T. Jacobsen
4f1238af71 Fix whitespace issues 2014-07-16 00:21:16 +01:00
Ian T. Jacobsen
122a1e2af9 Fixed cases where file would be opened, but not closed. And small realloc memory issue. 2014-07-16 00:16:32 +01:00
Petri Lehtinen
c8d017bd88 Merge branch '2.6' 2014-07-12 06:43:07 +03:00