You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by da...@apache.org on 2016/07/14 20:41:45 UTC

[01/20] jiffy commit: updated refs/heads/master to d3c00e1

Repository: couchdb-jiffy
Updated Branches:
  refs/heads/master ea19c417f -> d3c00e19d


Fix compiler warning on gcc 5.1.0


Project: http://git-wip-us.apache.org/repos/asf/couchdb-jiffy/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-jiffy/commit/e008c0c3
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-jiffy/tree/e008c0c3
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-jiffy/diff/e008c0c3

Branch: refs/heads/master
Commit: e008c0c3fffb4f509c5ae6b73b960663d778f231
Parents: f661ee9
Author: Paul J. Davis <pa...@gmail.com>
Authored: Sat Jul 25 12:47:52 2015 -0500
Committer: Paul J. Davis <pa...@gmail.com>
Committed: Sat Jul 25 12:47:52 2015 -0500

----------------------------------------------------------------------
 c_src/double-conversion/bignum.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-jiffy/blob/e008c0c3/c_src/double-conversion/bignum.cc
----------------------------------------------------------------------
diff --git a/c_src/double-conversion/bignum.cc b/c_src/double-conversion/bignum.cc
index 89c0ab2..7c88ff7 100644
--- a/c_src/double-conversion/bignum.cc
+++ b/c_src/double-conversion/bignum.cc
@@ -104,7 +104,7 @@ void Bignum::AssignDecimalString(Vector<const char> value) {
   const int kMaxUint64DecimalDigits = 19;
   Zero();
   int length = value.length();
-  int pos = 0;
+  unsigned int pos = 0;
   // Let's just say that each digit needs 4 bits.
   while (length >= kMaxUint64DecimalDigits) {
     uint64_t digits = ReadUInt64(value, pos, kMaxUint64DecimalDigits);


[14/20] jiffy commit: updated refs/heads/master to d3c00e1

Posted by da...@apache.org.
Ignore hexer.config


Project: http://git-wip-us.apache.org/repos/asf/couchdb-jiffy/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-jiffy/commit/752ec1d3
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-jiffy/tree/752ec1d3
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-jiffy/diff/752ec1d3

Branch: refs/heads/master
Commit: 752ec1d3fc7a354ab7c4a46db1791e7ec22b29bc
Parents: d0ab02a
Author: Paul J. Davis <pa...@gmail.com>
Authored: Wed Jan 6 13:07:47 2016 -0600
Committer: Paul J. Davis <pa...@gmail.com>
Committed: Wed Jan 6 13:07:47 2016 -0600

----------------------------------------------------------------------
 .gitignore | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-jiffy/blob/752ec1d3/.gitignore
----------------------------------------------------------------------
diff --git a/.gitignore b/.gitignore
index b7aeb08..e3e5e72 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,9 +1,10 @@
+.eunit
 .jiffy.dev
 *.app
 *.beam
 *.o
 *.so
-.eunit
 deps
 erln8.config
+hexer.config
 TEST-*.xml


[05/20] jiffy commit: updated refs/heads/master to d3c00e1

Posted by da...@apache.org.
Don't rely on an environment variable for Travis

The environment variable approach breaks other projects' Travis-CI runs
if they include other projects that depend on a different version of
PropEr.

Fixes: #106


Project: http://git-wip-us.apache.org/repos/asf/couchdb-jiffy/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-jiffy/commit/75dd2591
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-jiffy/tree/75dd2591
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-jiffy/diff/75dd2591

Branch: refs/heads/master
Commit: 75dd259189b1c1134f4e0c0de667da3dc67590bf
Parents: 8a7c672
Author: Paul J. Davis <pa...@gmail.com>
Authored: Mon Aug 31 11:31:28 2015 -0500
Committer: Paul J. Davis <pa...@gmail.com>
Committed: Mon Aug 31 11:36:08 2015 -0500

----------------------------------------------------------------------
 .travis.yml         | 1 +
 rebar.config.script | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-jiffy/blob/75dd2591/.travis.yml
----------------------------------------------------------------------
diff --git a/.travis.yml b/.travis.yml
index 2865a8a..fa26d15 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,6 +1,7 @@
 language: erlang
 notifications:
   email: paul.joseph.davis@gmail.com
+script: make check
 otp_release:
    - 17.5
    - 17.4

http://git-wip-us.apache.org/repos/asf/couchdb-jiffy/blob/75dd2591/rebar.config.script
----------------------------------------------------------------------
diff --git a/rebar.config.script b/rebar.config.script
index e5f561d..8a0049d 100644
--- a/rebar.config.script
+++ b/rebar.config.script
@@ -16,7 +16,7 @@ Proper = [
 ConfigPath = filename:dirname(SCRIPT),
 DevMarker = filename:join([ConfigPath, ".jiffy.dev"]),
 
-case filelib:is_file(DevMarker) orelse os:getenv("TRAVIS") == "true" of
+case filelib:is_file(DevMarker) of
     true ->
         % Don't override existing dependencies
         Config0 = case lists:keyfind(deps, 1, CONFIG) of


[07/20] jiffy commit: updated refs/heads/master to d3c00e1

Posted by da...@apache.org.
Fix jiffy:encode Dialyzer spec.


Project: http://git-wip-us.apache.org/repos/asf/couchdb-jiffy/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-jiffy/commit/cfc61a2e
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-jiffy/tree/cfc61a2e
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-jiffy/diff/cfc61a2e

Branch: refs/heads/master
Commit: cfc61a2e952dc3182e0f9b1473467563699992e2
Parents: 66594cf
Author: Adam Krupicka <ak...@mail.muni.cz>
Authored: Tue Oct 13 14:54:39 2015 +0200
Committer: Paul J. Davis <pa...@gmail.com>
Committed: Tue Oct 13 11:24:37 2015 -0500

----------------------------------------------------------------------
 src/jiffy.erl | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-jiffy/blob/cfc61a2e/src/jiffy.erl
----------------------------------------------------------------------
diff --git a/src/jiffy.erl b/src/jiffy.erl
index 4c9577f..78f4cf2 100644
--- a/src/jiffy.erl
+++ b/src/jiffy.erl
@@ -77,12 +77,12 @@ decode(Data, Opts) when is_list(Data) ->
     decode(iolist_to_binary(Data), Opts).
 
 
--spec encode(json_value()) -> iolist().
+-spec encode(json_value()) -> iodata().
 encode(Data) ->
     encode(Data, []).
 
 
--spec encode(json_value(), encode_options()) -> iolist().
+-spec encode(json_value(), encode_options()) -> iodata().
 encode(Data, Options) ->
     ForceUTF8 = lists:member(force_utf8, Options),
     case nif_encode_init(Data, Options) of


[10/20] jiffy commit: updated refs/heads/master to d3c00e1

Posted by da...@apache.org.
Remove old debug printing


Project: http://git-wip-us.apache.org/repos/asf/couchdb-jiffy/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-jiffy/commit/e43ea64a
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-jiffy/tree/e43ea64a
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-jiffy/diff/e43ea64a

Branch: refs/heads/master
Commit: e43ea64ae0d227af5dd003132234cdf4494d781d
Parents: c566977
Author: Paul J. Davis <pa...@gmail.com>
Authored: Wed Dec 2 11:23:30 2015 -0600
Committer: Paul J. Davis <pa...@gmail.com>
Committed: Wed Dec 2 11:23:30 2015 -0600

----------------------------------------------------------------------
 c_src/decoder.c | 3 ---
 c_src/encoder.c | 3 ---
 2 files changed, 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-jiffy/blob/e43ea64a/c_src/decoder.c
----------------------------------------------------------------------
diff --git a/c_src/decoder.c b/c_src/decoder.c
index 12debb6..34cf467 100644
--- a/c_src/decoder.c
+++ b/c_src/decoder.c
@@ -759,10 +759,7 @@ decode_iter(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[])
     objs = argv[3];
     curr = argv[4];
 
-    //fprintf(stderr, "Parsing:\r\n");
     while(d->i < bin.size) {
-        //fprintf(stderr, "state: %d\r\n", dec_curr(d));
-
         if(should_yield(env, &bytes_read, d->bytes_per_red)) {
             return enif_make_tuple5(
                     env,

http://git-wip-us.apache.org/repos/asf/couchdb-jiffy/blob/e43ea64a/c_src/encoder.c
----------------------------------------------------------------------
diff --git a/c_src/encoder.c b/c_src/encoder.c
index 0029086..9c6f59d 100644
--- a/c_src/encoder.c
+++ b/c_src/encoder.c
@@ -541,7 +541,6 @@ enc_map_to_ejson(ErlNifEnv* env, ERL_NIF_TERM map, ERL_NIF_TERM* out)
     ERL_NIF_TERM val;
 
     if(!enif_get_map_size(env, map, &size)) {
-        fprintf(stderr, "bad map size\r\n");
         return 0;
     }
 
@@ -553,14 +552,12 @@ enc_map_to_ejson(ErlNifEnv* env, ERL_NIF_TERM map, ERL_NIF_TERM* out)
     }
 
     if(!enif_map_iterator_create(env, map, &iter, ERL_NIF_MAP_ITERATOR_HEAD)) {
-        fprintf(stderr, "bad iterator create\r\n");
         return 0;
     }
 
     do {
         if(!enif_map_iterator_get_pair(env, &iter, &key, &val)) {
             enif_map_iterator_destroy(env, &iter);
-            fprintf(stderr, "bad get pair\r\n");
             return 0;
         }
         tuple = enif_make_tuple2(env, key, val);


[19/20] jiffy commit: updated refs/heads/master to d3c00e1

Posted by da...@apache.org.
Fix enc_long for 64-bit Windows

Originally reported by @NorthNick on apache/couchdb-jiffy.


Project: http://git-wip-us.apache.org/repos/asf/couchdb-jiffy/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-jiffy/commit/4c0bfbc0
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-jiffy/tree/4c0bfbc0
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-jiffy/diff/4c0bfbc0

Branch: refs/heads/master
Commit: 4c0bfbc0fa0de12dcc4ff263888eeaa431ae6ed2
Parents: 330f41c
Author: Paul J. Davis <pa...@gmail.com>
Authored: Wed Jul 13 14:46:22 2016 -0500
Committer: Paul J. Davis <pa...@gmail.com>
Committed: Wed Jul 13 14:47:37 2016 -0500

----------------------------------------------------------------------
 c_src/encoder.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-jiffy/blob/4c0bfbc0/c_src/encoder.c
----------------------------------------------------------------------
diff --git a/c_src/encoder.c b/c_src/encoder.c
index 9c6f59d..e864777 100644
--- a/c_src/encoder.c
+++ b/c_src/encoder.c
@@ -408,7 +408,7 @@ enc_long(Encoder* e, ErlNifSInt64 val)
     }
 
 #if (defined(__WIN32__) || defined(_WIN32) || defined(_WIN32_))
-    snprintf(&(e->p[e->i]), 32, "%ld", val);
+    snprintf(&(e->p[e->i]), 32, "%lld", val);
 #elif SIZEOF_LONG == 8
     snprintf(&(e->p[e->i]), 32, "%ld", val);
 #else


[02/20] jiffy commit: updated refs/heads/master to d3c00e1

Posted by da...@apache.org.
Fix win32 build


Project: http://git-wip-us.apache.org/repos/asf/couchdb-jiffy/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-jiffy/commit/f077ed2a
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-jiffy/tree/f077ed2a
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-jiffy/diff/f077ed2a

Branch: refs/heads/master
Commit: f077ed2a1de263d813d9d0787825196246a43a62
Parents: e008c0c
Author: Victor Galkin <vi...@gmail.com>
Authored: Thu Aug 20 14:59:58 2015 +0300
Committer: Victor Galkin <vi...@gmail.com>
Committed: Thu Aug 20 14:59:58 2015 +0300

----------------------------------------------------------------------
 rebar.config | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-jiffy/blob/f077ed2a/rebar.config
----------------------------------------------------------------------
diff --git a/rebar.config b/rebar.config
index 76c5806..79cae29 100644
--- a/rebar.config
+++ b/rebar.config
@@ -25,7 +25,7 @@
 
     %% This will merge into basho/rebar/rebar.config eventually
     {"win32", "CFLAGS", "/Wall /DWIN32 /D_WINDOWS /D_WIN32 /DWINDOWS"},
-    {"win32", "CXXFLAGS", "-g -Wall -O3"}
+    {"win32", "CXXFLAGS", "-Ic_src/ -g -Wall -O3"}
 ]}.
 
 {erl_opts, [


[11/20] jiffy commit: updated refs/heads/master to d3c00e1

Posted by da...@apache.org.
Document the use_nil option for encoding JSON


Project: http://git-wip-us.apache.org/repos/asf/couchdb-jiffy/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-jiffy/commit/c65273f8
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-jiffy/tree/c65273f8
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-jiffy/diff/c65273f8

Branch: refs/heads/master
Commit: c65273f8a4e1eaf4a5fff0250f2c82e2818ce610
Parents: e43ea64
Author: Paul J. Davis <pa...@gmail.com>
Authored: Wed Dec 2 11:29:36 2015 -0600
Committer: Paul J. Davis <pa...@gmail.com>
Committed: Wed Dec 2 11:29:36 2015 -0600

----------------------------------------------------------------------
 README.md | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-jiffy/blob/c65273f8/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index 2fe68ed..e291de4 100644
--- a/README.md
+++ b/README.md
@@ -71,6 +71,7 @@ The options for encode are:
 * `force_utf8` - Force strings to encode as UTF-8 by fixing broken
   surrogate pairs and/or using the replacement character to remove
   broken UTF-8 sequences in data.
+* `use_nil` - Encode's the atom `nil` as `null`.
 * `escape_forward_slashes` - Escapes the `/` character which can be
   useful when encoding URLs in some cases.
 * `{bytes_per_red, N}` - Refer to the decode options


[03/20] jiffy commit: updated refs/heads/master to d3c00e1

Posted by da...@apache.org.
Merge pull request #103 from vicglarson/master

Fix win32 build

Project: http://git-wip-us.apache.org/repos/asf/couchdb-jiffy/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-jiffy/commit/8a7c6726
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-jiffy/tree/8a7c6726
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-jiffy/diff/8a7c6726

Branch: refs/heads/master
Commit: 8a7c67265a90ef6d3067e00102cfea0bb5896178
Parents: e008c0c f077ed2
Author: Paul J. Davis <pa...@gmail.com>
Authored: Fri Aug 21 15:04:35 2015 -0500
Committer: Paul J. Davis <pa...@gmail.com>
Committed: Fri Aug 21 15:04:35 2015 -0500

----------------------------------------------------------------------
 rebar.config | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------



[12/20] jiffy commit: updated refs/heads/master to d3c00e1

Posted by da...@apache.org.
Remove ETAP license information


Project: http://git-wip-us.apache.org/repos/asf/couchdb-jiffy/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-jiffy/commit/e67d0c34
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-jiffy/tree/e67d0c34
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-jiffy/diff/e67d0c34

Branch: refs/heads/master
Commit: e67d0c346132e0dee5338028c6074ace5203ee66
Parents: c65273f
Author: Paul J. Davis <pa...@gmail.com>
Authored: Wed Jan 6 12:59:08 2016 -0600
Committer: Paul J. Davis <pa...@gmail.com>
Committed: Wed Jan 6 12:59:08 2016 -0600

----------------------------------------------------------------------
 LICENSE | 28 ----------------------------
 1 file changed, 28 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-jiffy/blob/e67d0c34/LICENSE
----------------------------------------------------------------------
diff --git a/LICENSE b/LICENSE
index 6d5c254..cc6e647 100644
--- a/LICENSE
+++ b/LICENSE
@@ -26,34 +26,6 @@ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 OTHER DEALINGS IN THE SOFTWARE.
 
-Etap
-====
-
-Files: test/etap.erl
-
-Copyright (c) 2008-2009 Nick Gerakines <ni...@gerakines.net>
-
-Permission is hereby granted, free of charge, to any person
-obtaining a copy of this software and associated documentation
-files (the "Software"), to deal in the Software without
-restriction, including without limitation the rights to use,
-copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the
-Software is furnished to do so, subject to the following
-conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
-OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
-
 Yajl Test Cases
 ===============
 


[06/20] jiffy commit: updated refs/heads/master to d3c00e1

Posted by da...@apache.org.
Merge pull request #104 from pinotree/hurd

rebar.config: set CFLAGS/CXXFLAGS/LDFLAGS on Hurd

Project: http://git-wip-us.apache.org/repos/asf/couchdb-jiffy/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-jiffy/commit/66594cf6
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-jiffy/tree/66594cf6
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-jiffy/diff/66594cf6

Branch: refs/heads/master
Commit: 66594cf6f4dc7ecdd17f742d103e55437edea972
Parents: 75dd259 efa697d
Author: Paul J. Davis <pa...@gmail.com>
Authored: Mon Aug 31 11:51:10 2015 -0500
Committer: Paul J. Davis <pa...@gmail.com>
Committed: Mon Aug 31 11:51:10 2015 -0500

----------------------------------------------------------------------
 rebar.config | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------



[20/20] jiffy commit: updated refs/heads/master to d3c00e1

Posted by da...@apache.org.
Merge branch 'upstream'


Project: http://git-wip-us.apache.org/repos/asf/couchdb-jiffy/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-jiffy/commit/d3c00e19
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-jiffy/tree/d3c00e19
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-jiffy/diff/d3c00e19

Branch: refs/heads/master
Commit: d3c00e19d8fa20c21758402231247602190988d3
Parents: ea19c41 4c0bfbc
Author: Paul J. Davis <pa...@gmail.com>
Authored: Thu Jul 14 15:41:24 2016 -0500
Committer: Paul J. Davis <pa...@gmail.com>
Committed: Thu Jul 14 15:41:24 2016 -0500

----------------------------------------------------------------------
 .gitignore                        |  3 +-
 LICENSE                           | 52 ++++++++++++++++++----------------
 README.md                         |  1 +
 c_src/decoder.c                   |  3 --
 c_src/double-conversion/bignum.cc |  2 +-
 c_src/encoder.c                   |  8 +++---
 rebar.config                      |  8 +++---
 rebar.config.script               |  2 +-
 src/jiffy.app.src                 |  5 +++-
 src/jiffy.erl                     | 12 ++++++--
 test/jiffy_04_string_tests.erl    | 24 ++++++++++++++++
 11 files changed, 77 insertions(+), 43 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-jiffy/blob/d3c00e19/rebar.config
----------------------------------------------------------------------


[13/20] jiffy commit: updated refs/heads/master to d3c00e1

Posted by da...@apache.org.
Update jiff.app.src for hex.pm

Time for Jiffy to enter the world of Erlang package management.


Project: http://git-wip-us.apache.org/repos/asf/couchdb-jiffy/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-jiffy/commit/d0ab02a1
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-jiffy/tree/d0ab02a1
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-jiffy/diff/d0ab02a1

Branch: refs/heads/master
Commit: d0ab02a1d3c77ee337bcc306925c9dacb02d1319
Parents: e67d0c3
Author: Paul J. Davis <pa...@gmail.com>
Authored: Wed Jan 6 13:03:05 2016 -0600
Committer: Paul J. Davis <pa...@gmail.com>
Committed: Wed Jan 6 13:03:30 2016 -0600

----------------------------------------------------------------------
 src/jiffy.app.src | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-jiffy/blob/d0ab02a1/src/jiffy.app.src
----------------------------------------------------------------------
diff --git a/src/jiffy.app.src b/src/jiffy.app.src
index 6f49231..ea3f1d1 100644
--- a/src/jiffy.app.src
+++ b/src/jiffy.app.src
@@ -2,5 +2,8 @@
     {description, "JSON Decoder/Encoder."},
     {vsn, git},
     {registered, []},
-    {applications, [kernel, stdlib]}
+    {applications, [kernel, stdlib]},
+    {maintainers, ["Paul J. Davis"]},
+    {licenses, ["MIT", "BSD"]},
+    {links, [{"GitHub", "https://github.com/davisp/jiffy"}]}
 ]}.


[04/20] jiffy commit: updated refs/heads/master to d3c00e1

Posted by da...@apache.org.
rebar.config: set CFLAGS/CXXFLAGS/LDFLAGS on Hurd

Use the common CFLAGS/CXXFLAGS/LDFLAGS used on Linux/FreeBSD/etc also
on GNU/Hurd.


Project: http://git-wip-us.apache.org/repos/asf/couchdb-jiffy/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-jiffy/commit/efa697d1
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-jiffy/tree/efa697d1
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-jiffy/diff/efa697d1

Branch: refs/heads/master
Commit: efa697d1c9e857dfcf9332447b900f68e824e916
Parents: 8a7c672
Author: Pino Toscano <to...@tiscali.it>
Authored: Mon Aug 24 23:08:13 2015 +0200
Committer: Pino Toscano <to...@tiscali.it>
Committed: Mon Aug 24 23:08:13 2015 +0200

----------------------------------------------------------------------
 rebar.config | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-jiffy/blob/efa697d1/rebar.config
----------------------------------------------------------------------
diff --git a/rebar.config b/rebar.config
index 79cae29..9d26448 100644
--- a/rebar.config
+++ b/rebar.config
@@ -7,12 +7,12 @@
 ]}.
 
 {port_env, [
-    {"(linux|solaris|freebsd|netbsd|openbsd|dragonfly|darwin)",
+    {"(linux|solaris|freebsd|netbsd|openbsd|dragonfly|darwin|gnu)",
         "CFLAGS", "$CFLAGS -Ic_src/ -g -Wall -Werror -O3 -fno-strict-aliasing"},
-    {"(linux|solaris|freebsd|netbsd|openbsd|dragonfly|darwin)",
+    {"(linux|solaris|freebsd|netbsd|openbsd|dragonfly|darwin|gnu)",
         "CXXFLAGS", "$CXXFLAGS -Ic_src/ -g -Wall -Werror -O3"},
 
-    {"(linux|solaris|freebsd|netbsd|openbsd|dragonfly|darwin)",
+    {"(linux|solaris|freebsd|netbsd|openbsd|dragonfly|darwin|gnu)",
         "LDFLAGS", "$LDFLAGS -lstdc++"},
 
     %% OS X Leopard flags for 64-bit


[18/20] jiffy commit: updated refs/heads/master to d3c00e1

Posted by da...@apache.org.
Merge pull request #119 from egobrain/patch-1

Fixed wrong jiffy:decode/2 spec

Project: http://git-wip-us.apache.org/repos/asf/couchdb-jiffy/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-jiffy/commit/330f41c4
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-jiffy/tree/330f41c4
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-jiffy/diff/330f41c4

Branch: refs/heads/master
Commit: 330f41c486cf949707eb494b855634df324a6d92
Parents: 1febce3 8eb8f3e
Author: Paul J. Davis <pa...@gmail.com>
Authored: Wed Apr 6 10:08:49 2016 -0500
Committer: Paul J. Davis <pa...@gmail.com>
Committed: Wed Apr 6 10:08:49 2016 -0500

----------------------------------------------------------------------
 src/jiffy.erl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------



[16/20] jiffy commit: updated refs/heads/master to d3c00e1

Posted by da...@apache.org.
Fix force_utf8 for object keys

Previously if a key was malformed UTF-8 and the user specified the
`force_utf8` option we would fail to try and encode a fixed up version
of the object. This was due to missing a clause to catch the
`invalid_object_member_key` exception. This adds the clause and a couple
tests to ensure it works.


Project: http://git-wip-us.apache.org/repos/asf/couchdb-jiffy/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-jiffy/commit/1febce3c
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-jiffy/tree/1febce3c
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-jiffy/diff/1febce3c

Branch: refs/heads/master
Commit: 1febce3ca86c5ca5d5a3618ed3d5f125bb99e4c5
Parents: 6303ff9
Author: Paul J. Davis <pa...@gmail.com>
Authored: Thu Mar 31 11:00:10 2016 -0500
Committer: Paul J. Davis <pa...@gmail.com>
Committed: Thu Mar 31 11:00:10 2016 -0500

----------------------------------------------------------------------
 src/jiffy.erl                  |  6 ++++++
 test/jiffy_04_string_tests.erl | 24 ++++++++++++++++++++++++
 2 files changed, 30 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-jiffy/blob/1febce3c/src/jiffy.erl
----------------------------------------------------------------------
diff --git a/src/jiffy.erl b/src/jiffy.erl
index 78f4cf2..215674c 100644
--- a/src/jiffy.erl
+++ b/src/jiffy.erl
@@ -89,6 +89,9 @@ encode(Data, Options) ->
         {error, {invalid_string, _}} when ForceUTF8 == true ->
             FixedData = jiffy_utf8:fix(Data),
             encode(FixedData, Options -- [force_utf8]);
+        {error, {invalid_object_member_key, _}} when ForceUTF8 == true ->
+            FixedData = jiffy_utf8:fix(Data),
+            encode(FixedData, Options -- [force_utf8]);
         {error, _} = Error ->
             throw(Error);
         {partial, IOData} ->
@@ -191,6 +194,9 @@ encode_loop(Data, Options, Encoder, Stack, IOBuf) ->
         {error, {invalid_string, _}} when ForceUTF8 == true ->
             FixedData = jiffy_utf8:fix(Data),
             encode(FixedData, Options -- [force_utf8]);
+        {error, {invalid_object_member_key, _}} when ForceUTF8 == true ->
+            FixedData = jiffy_utf8:fix(Data),
+            encode(FixedData, Options -- [force_utf8]);
         {error, _} = Error ->
             throw(Error);
         {partial, IOData} ->

http://git-wip-us.apache.org/repos/asf/couchdb-jiffy/blob/1febce3c/test/jiffy_04_string_tests.erl
----------------------------------------------------------------------
diff --git a/test/jiffy_04_string_tests.erl b/test/jiffy_04_string_tests.erl
index 0d642d5..7cf645d 100644
--- a/test/jiffy_04_string_tests.erl
+++ b/test/jiffy_04_string_tests.erl
@@ -23,6 +23,16 @@ string_error_test_() ->
 string_utf8_test_() ->
     [gen(utf8, Case) || Case <- cases(utf8)].
 
+
+string_bad_utf8_key_test_() ->
+    Cases = cases(bad_utf8_key),
+    {{J}, {E}} = hd(Cases),
+    ExtraProps = [{<<"abcdeefeadasffasdfa">>, I} || I <- lists:seq(1, 10000)],
+    Big = {{ExtraProps ++ J}, {ExtraProps ++ E}},
+    AllCases = [Big | Cases],
+    [gen(bad_utf8_key, Case) || Case <- AllCases].
+
+
 string_escaped_slashes_test_() ->
     [gen(escaped_slashes, Case) || Case <- cases(escaped_slashes)].
 
@@ -54,6 +64,12 @@ gen(utf8, {Case, Fixed}) ->
         ?_assertThrow({error, {_, invalid_string}}, jiffy:decode(Case2))
     ]};
 
+gen(bad_utf8_key, {J, E}) ->
+    {msg("Bad UTF-8 key: - ~p", [size(term_to_binary(J))]), [
+        ?_assertThrow({error, {invalid_object_member_key, _}}, jiffy:encode(J)),
+        ?_assertEqual(E, jiffy:decode(jiffy:encode(J, [force_utf8])))
+    ]};
+
 gen(escaped_slashes, {J, E}) ->
     {msg("escaped_slashes - ~s", [J]), [
         {"Decode", ?_assertEqual(E, dec(J))},
@@ -152,6 +168,14 @@ cases(utf8) ->
         {<<16#FC, 16#82, 16#80, 16#80, 16#80, 16#80>>, <<16#EF, 16#BF, 16#BD>>}
     ];
 
+cases(bad_utf8_key) ->
+    [
+        {
+            {[{<<"foo", 16#80, "bar">>, true}]},
+            {[{<<"foo", 16#EF, 16#BF, 16#BD, "bar">>, true}]}
+        }
+    ];
+
 cases(escaped_slashes) ->
     [
         {<<"\"\\/\"">>, <<"/">>}


[17/20] jiffy commit: updated refs/heads/master to d3c00e1

Posted by da...@apache.org.
Fixed wrong jiffy:decode/2 spec

Project: http://git-wip-us.apache.org/repos/asf/couchdb-jiffy/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-jiffy/commit/8eb8f3eb
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-jiffy/tree/8eb8f3eb
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-jiffy/diff/8eb8f3eb

Branch: refs/heads/master
Commit: 8eb8f3ebf35a9bf02f1c9ea6ed1148de0ef7b59a
Parents: 1febce3
Author: Yakov <xa...@gmail.com>
Authored: Wed Apr 6 14:22:01 2016 +0400
Committer: Yakov <xa...@gmail.com>
Committed: Wed Apr 6 14:22:01 2016 +0400

----------------------------------------------------------------------
 src/jiffy.erl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-jiffy/blob/8eb8f3eb/src/jiffy.erl
----------------------------------------------------------------------
diff --git a/src/jiffy.erl b/src/jiffy.erl
index 215674c..9871e4f 100644
--- a/src/jiffy.erl
+++ b/src/jiffy.erl
@@ -61,7 +61,7 @@ decode(Data) ->
     decode(Data, []).
 
 
--spec decode(iolist() | binary(), decode_options()) -> json_value().
+-spec decode(iolist() | binary(), decode_options()) -> jiffy_decode_result().
 decode(Data, Opts) when is_binary(Data), is_list(Opts) ->
     case nif_decode_init(Data, Opts) of
         {error, _} = Error ->


[08/20] jiffy commit: updated refs/heads/master to d3c00e1

Posted by da...@apache.org.
Destroy map iterators once we're done with them.

Each call to enif_map_iterator_create() must be paired with a call to
enif_map_iterator_destroy(). Otherwise, we'll leak memory.

Fixes #112


Project: http://git-wip-us.apache.org/repos/asf/couchdb-jiffy/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-jiffy/commit/fa825b6f
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-jiffy/tree/fa825b6f
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-jiffy/diff/fa825b6f

Branch: refs/heads/master
Commit: fa825b6fd6ca9518b090edc055d1413b8a44068d
Parents: cfc61a2
Author: Jon Parise <jo...@indelible.org>
Authored: Wed Nov 25 17:58:00 2015 -0500
Committer: Jon Parise <jo...@indelible.org>
Committed: Wed Nov 25 18:23:37 2015 -0500

----------------------------------------------------------------------
 c_src/encoder.c | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-jiffy/blob/fa825b6f/c_src/encoder.c
----------------------------------------------------------------------
diff --git a/c_src/encoder.c b/c_src/encoder.c
index 4a96048..0029086 100644
--- a/c_src/encoder.c
+++ b/c_src/encoder.c
@@ -559,6 +559,7 @@ enc_map_to_ejson(ErlNifEnv* env, ERL_NIF_TERM map, ERL_NIF_TERM* out)
 
     do {
         if(!enif_map_iterator_get_pair(env, &iter, &key, &val)) {
+            enif_map_iterator_destroy(env, &iter);
             fprintf(stderr, "bad get pair\r\n");
             return 0;
         }
@@ -566,6 +567,8 @@ enc_map_to_ejson(ErlNifEnv* env, ERL_NIF_TERM map, ERL_NIF_TERM* out)
         list = enif_make_list_cell(env, tuple, list);
     } while(enif_map_iterator_next(env, &iter));
 
+    enif_map_iterator_destroy(env, &iter);
+
     *out = enif_make_tuple1(env, list);
     return 1;
 }


[15/20] jiffy commit: updated refs/heads/master to d3c00e1

Posted by da...@apache.org.
Copy double-conversion license to root LICENSE

This was marked in the c_src/double-conversion directory but I've gone
ahead and added a copy to the root LICENSE file.


Project: http://git-wip-us.apache.org/repos/asf/couchdb-jiffy/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-jiffy/commit/6303ff98
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-jiffy/tree/6303ff98
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-jiffy/diff/6303ff98

Branch: refs/heads/master
Commit: 6303ff98aaa3fce625038c8b7af2aa8b802f4742
Parents: 752ec1d
Author: Paul J. Davis <pa...@gmail.com>
Authored: Wed Jan 6 13:28:05 2016 -0600
Committer: Paul J. Davis <pa...@gmail.com>
Committed: Wed Jan 6 13:28:05 2016 -0600

----------------------------------------------------------------------
 LICENSE | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-jiffy/blob/6303ff98/LICENSE
----------------------------------------------------------------------
diff --git a/LICENSE b/LICENSE
index cc6e647..2ae36f9 100644
--- a/LICENSE
+++ b/LICENSE
@@ -26,6 +26,36 @@ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 OTHER DEALINGS IN THE SOFTWARE.
 
+Google double-conversion
+========================
+
+Copyright 2006-2011, the V8 project authors. All rights reserved.
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+    * Redistributions of source code must retain the above copyright
+      notice, this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above
+      copyright notice, this list of conditions and the following
+      disclaimer in the documentation and/or other materials provided
+      with the distribution.
+    * Neither the name of Google Inc. nor the names of its
+      contributors may be used to endorse or promote products derived
+      from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
 Yajl Test Cases
 ===============
 


[09/20] jiffy commit: updated refs/heads/master to d3c00e1

Posted by da...@apache.org.
Merge pull request #113 from jparise/map-iter-destroy

Destroy map iterators once we're done with them.

Project: http://git-wip-us.apache.org/repos/asf/couchdb-jiffy/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-jiffy/commit/c566977d
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-jiffy/tree/c566977d
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-jiffy/diff/c566977d

Branch: refs/heads/master
Commit: c566977d9f43ed9540aca745c3b980273e8c04cc
Parents: cfc61a2 fa825b6
Author: Paul J. Davis <pa...@gmail.com>
Authored: Wed Dec 2 11:21:32 2015 -0600
Committer: Paul J. Davis <pa...@gmail.com>
Committed: Wed Dec 2 11:21:32 2015 -0600

----------------------------------------------------------------------
 c_src/encoder.c | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------