From: Petri Lehtinen Date: Thu, 21 Jan 2010 20:29:26 +0000 (+0200) Subject: Merge branch 'c++-api' X-Git-Tag: v1.3~21 X-Git-Url: http://www.project-moonshot.org/gitweb/?p=jansson.git;a=commitdiff_plain;h=3dd29366b8f4c6809c7e654bfc9aa0bd0070febf;hp=38950b081cae9b231b5474d4cb861f8fa2b1d099 Merge branch 'c++-api' --- diff --git a/.gitignore b/.gitignore index a2baa14..4c4115c 100644 --- a/.gitignore +++ b/.gitignore @@ -22,3 +22,4 @@ missing *.la stamp-h1 *.pyc +*.pc diff --git a/CHANGES b/CHANGES index abe0062..02f28c4 100644 --- a/CHANGES +++ b/CHANGES @@ -1,54 +1,117 @@ -Version 1.1.3, released 2009-12-18 +Version 1.2 +=========== + +Released 2010-01-21 + +* New functions: + + - `json_equal()`: Test whether two JSON values are equal + - `json_copy()` and `json_deep_copy()`: Make shallow and deep copies + of JSON values + - Add a version of all functions taking a string argument that + doesn't check for valid UTF-8: `json_string_nocheck()`, + `json_string_set_nocheck()`, `json_object_set_nocheck()`, + `json_object_set_new_nocheck()` + +* New encoding flags: + + - ``JSON_SORT_KEYS``: Sort objects by key + - ``JSON_ENSURE_ASCII``: Escape all non-ASCII Unicode characters + - ``JSON_COMPACT``: Use a compact representation with all unneeded + whitespace stripped + +* Bug fixes: + + - Revise and unify whitespace usage in encoder: Add spaces between + array and object items, never append newline to output. + - Remove const qualifier from the ``json_t`` parameter in + `json_string_set()`, `json_integer_set()` and `json_real_set`. + - Use ``int32_t`` internally for representing Unicode code points + (int is not enough on all platforms) + +* Other changes: + + - Convert ``CHANGES`` (this file) to reStructured text and add it to + HTML documentation + - The test system has been refactored. Python is no longer required + to run the tests. + - Documentation can now be built by invoking ``make html`` + - Support for pkg-config + + +Version 1.1.3 +============= + +Released 2009-12-18 * Encode reals correctly, so that first encoding and then decoding a real always produces the same value -* Don't export private symbols in libjansson.so +* Don't export private symbols in ``libjansson.so`` -Version 1.1.2, released 2009-11-08 +Version 1.1.2 +============= + +Released 2009-11-08 * Fix a bug where an error message was not produced if the input file - could not be opened in json_load_file() + could not be opened in `json_load_file()` * Fix an assertion failure in decoder caused by a minus sign without a digit after it -* Remove an unneeded include for stdint.h in jansson.h +* Remove an unneeded include of ``stdint.h`` in ``jansson.h`` + +Version 1.1.1 +============= -Version 1.1.1, released 2009-10-26 +Released 2009-10-26 * All documentation files were not distributed with v1.1; build documentation in make distcheck to prevent this in the future -* Fix v1.1 release date in CHANGES +* Fix v1.1 release date in ``CHANGES`` + +Version 1.1 +=========== -Version 1.1, released 2009-10-20 +Released 2009-10-20 * API additions and improvements: + - Extend array and object APIs - Add functions to modify integer, real and string values - Improve argument validation - - Use unsigned int instead of uint32_t for encoding flags + - Use unsigned int instead of ``uint32_t`` for encoding flags + * Enhance documentation + - Add getting started guide and tutorial - Fix some typos - General clarifications and cleanup + * Check for integer and real overflows and underflows in decoder -* Make singleton values thread-safe (true, false and null) +* Make singleton values thread-safe (``true``, ``false`` and ``null``) * Enhance circular reference handling -* Don't define -std=c99 in AM_CFLAGS -* Add C++ guards to jansson.h +* Don't define ``-std=c99`` in ``AM_CFLAGS`` +* Add C++ guards to ``jansson.h`` * Minor performance and portability improvements * Expand test coverage -Version 1.0.4, released 2009-10-11 +Version 1.0.4 +============= + +Released 2009-10-11 * Relax Autoconf version requirement to 2.59 -* Make Jansson compile on platforms where plain char is unsigned +* Make Jansson compile on platforms where plain ``char`` is unsigned * Fix API tests for object -Version 1.0.3, released 2009-09-14 +Version 1.0.3 +============= + +Released 2009-09-14 * Check for integer and real overflows and underflows in decoder * Use the Python json module for tests, or simplejson if the json @@ -56,16 +119,25 @@ Version 1.0.3, released 2009-09-14 * Distribute changelog (this file) -Version 1.0.2, released 2009-09-08 +Version 1.0.2 +============= + +Released 2009-09-08 * Handle EOF correctly in decoder -Version 1.0.1, released 2009-09-04 +Version 1.0.1 +============= + +Released 2009-09-04 + +* Fixed broken `json_is_boolean()` -* Fixed broken json_is_boolean() +Version 1.0 +=========== -Version 1.0, released 2009-08-25 +Released 2009-08-25 * Initial release diff --git a/Makefile.am b/Makefile.am index 185eaab..a141cd5 100644 --- a/Makefile.am +++ b/Makefile.am @@ -2,3 +2,6 @@ EXTRA_DIST = CHANGES LICENSE README.rst SUBDIRS = doc src test check-local: html + +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = jansson.pc diff --git a/configure.ac b/configure.ac index 43ce1d0..5290793 100644 --- a/configure.ac +++ b/configure.ac @@ -1,5 +1,5 @@ AC_PREREQ([2.59]) -AC_INIT([jansson], [1.1.3+], [petri@digip.org]) +AC_INIT([jansson], [1.2], [petri@digip.org]) AM_INIT_AUTOMAKE([1.10 foreign]) @@ -20,6 +20,7 @@ AC_PROG_LIBTOOL # Checks for library functions. AC_CONFIG_FILES([ + jansson.pc Makefile doc/Makefile src/Makefile diff --git a/doc/Makefile.am b/doc/Makefile.am index cb3723f..1a3f560 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -1,6 +1,5 @@ -EXTRA_DIST = \ - conf.py apiref.rst gettingstarted.rst github_commits.c index.rst \ - tutorial.rst ext/refcounting.py +EXTRA_DIST = conf.py apiref.rst changes.rst gettingstarted.rst \ + github_commits.c index.rst tutorial.rst ext/refcounting.py SPHINXBUILD = sphinx-build SPHINXOPTS = -d _build/doctrees -W @@ -17,4 +16,4 @@ uninstall-local: clean-local: rm -rf _build - rm -f ext/refcounting.pyc + rm -f ext/refcounting.pyc changes.rst diff --git a/doc/changes.rst b/doc/changes.rst new file mode 100644 index 0000000..ea56843 --- /dev/null +++ b/doc/changes.rst @@ -0,0 +1,5 @@ +****************** +Changes in Jansson +****************** + +.. include:: ../CHANGES diff --git a/doc/conf.py b/doc/conf.py index 10f444d..06530e3 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -50,9 +50,9 @@ copyright = u'2009, Petri Lehtinen' # built documents. # # The short X.Y version. -version = '1.1' +version = '1.2' # The full version, including alpha/beta/rc tags. -release = '1.1.3+' +release = '1.2' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. @@ -72,7 +72,7 @@ release = '1.1.3+' exclude_trees = ['_build'] # The reST default role (used for this markup: `text`) to use for all documents. -#default_role = None +default_role = 'cfunc' # If true, '()' will be appended to :func: etc. cross-reference text. #add_function_parentheses = True diff --git a/doc/index.rst b/doc/index.rst index 1ae9bf3..d6018b9 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -35,6 +35,7 @@ Contents gettingstarted tutorial apiref + changes Indices and Tables diff --git a/jansson.pc.in b/jansson.pc.in new file mode 100644 index 0000000..d9bf4da --- /dev/null +++ b/jansson.pc.in @@ -0,0 +1,10 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=${prefix}/include + +Name: Jansson +Description: Library for encoding, decoding and manipulating JSON data +Version: @VERSION@ +Libs: -L${libdir} -ljansson +Cflags: -I${includedir} diff --git a/src/Makefile.am b/src/Makefile.am index d5c20e8..460b26a 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -15,6 +15,6 @@ libjansson_la_SOURCES = \ value.c libjansson_la_LDFLAGS = \ -export-symbols-regex '^json_' \ - -version-info 1:2:1 + -version-info 2:0:2 AM_CFLAGS = -Wall -Wextra -Werror diff --git a/test/Makefile.am b/test/Makefile.am index e468d22..86d1614 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -1,5 +1,5 @@ SUBDIRS = bin suites -EXTRA_DIST = scripts +EXTRA_DIST = scripts run-suites TESTS = run-suites TESTS_ENVIRONMENT = \ diff --git a/test/run-suites b/test/run-suites index e736004..6e5baf6 100755 --- a/test/run-suites +++ b/test/run-suites @@ -14,7 +14,7 @@ done if [ -z "$SUITES" ]; then suitedirs=$top_srcdir/test/suites/* for suitedir in $suitedirs; do - if [ -x $suitedir/run ]; then + if [ -d $suitedir ]; then SUITES="$SUITES `basename $suitedir`" fi done diff --git a/test/suites/api/Makefile.am b/test/suites/api/Makefile.am index 35f1ee0..ddeb147 100644 --- a/test/suites/api/Makefile.am +++ b/test/suites/api/Makefile.am @@ -1,3 +1,5 @@ +EXTRA_DIST = run + check_PROGRAMS = \ test_array \ test_equal \