You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by rn...@apache.org on 2021/02/16 17:31:14 UTC

[couchdb-jiffy] branch main updated (11ae49f -> 998b862)

This is an automated email from the ASF dual-hosted git repository.

rnewson pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/couchdb-jiffy.git.


    from 11ae49f  Merge remote-tracking branch 'davisp/master'
     new 1df5ac5  Update rebar/enc binaries to R15B03-1
     new 685f14e  Silence compiler warnings for tests
     new 6dadc0c  Jiffy 1.0.5
     new f74b04f  Fix bug in bytes_per_red option
     new 0460350  Jiffy 1.0.6
     new 1388db4  Finally write down the package uplaod command
     new 6c88f83  Fixes #206
     new a3c36d6  Jiffy 1.0.7
     new 3f478cf  Remove unnecessary `maybe_map/1`
     new effc3c9  Jiffy 1.0.8
     new 37039ba  Fix support for R16
     new 998b862  Merge remote-tracking branch 'davisp/master'

The 12 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .gitignore                             |   1 +
 .travis.yml                            |   1 +
 Makefile                               |   4 ++++
 c_src/jiffy.c                          |   1 +
 c_src/jiffy.h                          |   1 +
 c_src/util.c                           |   2 +-
 enc                                    | Bin 23313 -> 26053 bytes
 src/jiffy.app.src                      |   2 +-
 src/jiffy.erl                          |   2 ++
 test/jiffy_15_return_trailer_tests.erl |  13 ++++++++++++-
 test/jiffy_17_copy_strings_tests.erl   |   2 +-
 test/jiffy_util.hrl                    |   3 +++
 12 files changed, 28 insertions(+), 4 deletions(-)


[couchdb-jiffy] 04/12: Fix bug in bytes_per_red option

Posted by rn...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rnewson pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/couchdb-jiffy.git

commit f74b04fd11a0a21544c90941ae1e239907e4fe67
Author: Paul J. Davis <pa...@gmail.com>
AuthorDate: Thu Oct 22 09:53:26 2020 -0500

    Fix bug in bytes_per_red option
    
    Turns out this was never implemented correctly since it was referring to
    the original bytes_per_iter atom.
---
 c_src/jiffy.c | 1 +
 c_src/jiffy.h | 1 +
 c_src/util.c  | 2 +-
 3 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/c_src/jiffy.c b/c_src/jiffy.c
index 03ded3e..dfca7c7 100644
--- a/c_src/jiffy.c
+++ b/c_src/jiffy.c
@@ -25,6 +25,7 @@ load(ErlNifEnv* env, void** priv, ERL_NIF_TERM info)
     st->atom_force_utf8 = make_atom(env, "force_utf8");
     st->atom_iter = make_atom(env, "iter");
     st->atom_bytes_per_iter = make_atom(env, "bytes_per_iter");
+    st->atom_bytes_per_red = make_atom(env, "bytes_per_red");
     st->atom_return_maps = make_atom(env, "return_maps");
     st->atom_return_trailer = make_atom(env, "return_trailer");
     st->atom_has_trailer = make_atom(env, "has_trailer");
diff --git a/c_src/jiffy.h b/c_src/jiffy.h
index 6d19500..9c97945 100644
--- a/c_src/jiffy.h
+++ b/c_src/jiffy.h
@@ -34,6 +34,7 @@ typedef struct {
     ERL_NIF_TERM    atom_force_utf8;
     ERL_NIF_TERM    atom_iter;
     ERL_NIF_TERM    atom_bytes_per_iter;
+    ERL_NIF_TERM    atom_bytes_per_red;
     ERL_NIF_TERM    atom_return_maps;
     ERL_NIF_TERM    atom_return_trailer;
     ERL_NIF_TERM    atom_has_trailer;
diff --git a/c_src/util.c b/c_src/util.c
index 2890a63..f6dcb68 100644
--- a/c_src/util.c
+++ b/c_src/util.c
@@ -80,7 +80,7 @@ get_bytes_per_red(ErlNifEnv* env, ERL_NIF_TERM val, size_t* bpi)
         return 0;
     }
 
-    if(enif_compare(tuple[0], st->atom_bytes_per_iter) != 0) {
+    if(enif_compare(tuple[0], st->atom_bytes_per_red) != 0) {
         return 0;
     }
 


[couchdb-jiffy] 10/12: Jiffy 1.0.8

Posted by rn...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rnewson pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/couchdb-jiffy.git

commit effc3c9a68478b692523e61b308ad9257c1ddeca
Author: Paul J. Davis <pa...@gmail.com>
AuthorDate: Thu Dec 10 10:07:15 2020 -0600

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

diff --git a/src/jiffy.app.src b/src/jiffy.app.src
index 7047715..a4909ef 100644
--- a/src/jiffy.app.src
+++ b/src/jiffy.app.src
@@ -1,6 +1,6 @@
 {application, jiffy, [
     {description, "JSON Decoder/Encoder."},
-    {vsn, "1.0.7"},
+    {vsn, "1.0.8"},
     {registered, []},
     {applications, [kernel, stdlib, xmerl]},
     {maintainers, ["Paul J. Davis"]},


[couchdb-jiffy] 05/12: Jiffy 1.0.6

Posted by rn...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rnewson pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/couchdb-jiffy.git

commit 046035068f136ec4536ddd7c4b7b2b9aba592aea
Author: Paul J. Davis <pa...@gmail.com>
AuthorDate: Thu Oct 22 09:54:33 2020 -0500

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

diff --git a/src/jiffy.app.src b/src/jiffy.app.src
index e3a43af..6b08c2a 100644
--- a/src/jiffy.app.src
+++ b/src/jiffy.app.src
@@ -1,6 +1,6 @@
 {application, jiffy, [
     {description, "JSON Decoder/Encoder."},
-    {vsn, "1.0.5"},
+    {vsn, "1.0.6"},
     {registered, []},
     {applications, [kernel, stdlib, xmerl]},
     {maintainers, ["Paul J. Davis"]},


[couchdb-jiffy] 09/12: Remove unnecessary `maybe_map/1`

Posted by rn...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rnewson pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/couchdb-jiffy.git

commit 3f478cf0c51e9cf18dec00c248ef426d84934c44
Author: Paul J. Davis <pa...@gmail.com>
AuthorDate: Thu Dec 10 10:06:31 2020 -0600

    Remove unnecessary `maybe_map/1`
    
    Thought slightly harder and realized this was unnecessary.
---
 src/jiffy.erl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/jiffy.erl b/src/jiffy.erl
index 1f3e2ad..6af15b5 100644
--- a/src/jiffy.erl
+++ b/src/jiffy.erl
@@ -137,7 +137,7 @@ finish_decode({Pairs}) when is_list(Pairs) ->
 finish_decode(Vals) when is_list(Vals) ->
     finish_decode_arr(Vals, []);
 finish_decode({has_trailer, Value, Rest}) ->
-    {has_trailer, maybe_map(finish_decode(Value)), Rest};
+    {has_trailer, finish_decode(Value), Rest};
 finish_decode(Val) ->
     maybe_map(Val).
 


[couchdb-jiffy] 07/12: Fixes #206

Posted by rn...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rnewson pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/couchdb-jiffy.git

commit 6c88f830fdc433d6e363aaf7de05a89af9cde0f1
Author: Paul J. Davis <pa...@gmail.com>
AuthorDate: Thu Dec 10 10:03:35 2020 -0600

    Fixes #206
---
 src/jiffy.erl                          |  2 ++
 test/jiffy_15_return_trailer_tests.erl | 10 +++++++++-
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/src/jiffy.erl b/src/jiffy.erl
index 900354e..1f3e2ad 100644
--- a/src/jiffy.erl
+++ b/src/jiffy.erl
@@ -136,6 +136,8 @@ finish_decode({Pairs}) when is_list(Pairs) ->
     finish_decode_obj(Pairs, []);
 finish_decode(Vals) when is_list(Vals) ->
     finish_decode_arr(Vals, []);
+finish_decode({has_trailer, Value, Rest}) ->
+    {has_trailer, maybe_map(finish_decode(Value)), Rest};
 finish_decode(Val) ->
     maybe_map(Val).
 
diff --git a/test/jiffy_15_return_trailer_tests.erl b/test/jiffy_15_return_trailer_tests.erl
index af80a46..2e702fd 100644
--- a/test/jiffy_15_return_trailer_tests.erl
+++ b/test/jiffy_15_return_trailer_tests.erl
@@ -16,4 +16,12 @@ trailer_test_() ->
     ],
     {"Test return_trailer", lists:map(fun({Data, Result}) ->
         ?_assertEqual(Result, jiffy:decode(Data, Opts))
-    end, Cases)}.
\ No newline at end of file
+    end, Cases)}.
+
+
+trailer_bignum_test() ->
+    Opts = [return_maps, return_trailer],
+    Data = <<"{\"amount\":-50000000000000000000}{}">>,
+    Obj = #{<<"amount">> => -50000000000000000000},
+    Expect = {has_trailer, Obj, <<"{}">>},
+    ?assertEqual(Expect, jiffy:decode(Data, Opts)).


[couchdb-jiffy] 06/12: Finally write down the package uplaod command

Posted by rn...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rnewson pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/couchdb-jiffy.git

commit 1388db4e6428b876b00d00bcb9bce08f04d7fafa
Author: Paul J. Davis <pa...@gmail.com>
AuthorDate: Thu Oct 22 09:56:44 2020 -0500

    Finally write down the package uplaod command
---
 Makefile | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/Makefile b/Makefile
index f781311..b982251 100644
--- a/Makefile
+++ b/Makefile
@@ -26,6 +26,10 @@ eunit:
 check: build eunit
 
 
+release:
+	rebar3 hex publish
+
+
 %.beam: %.erl
 	erlc -o test/ $<
 


[couchdb-jiffy] 01/12: Update rebar/enc binaries to R15B03-1

Posted by rn...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rnewson pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/couchdb-jiffy.git

commit 1df5ac5997745d6b564e6848cea442a9c62b5d9c
Author: Paul J. Davis <pa...@gmail.com>
AuthorDate: Tue Jun 30 12:20:34 2020 -0500

    Update rebar/enc binaries to R15B03-1
    
    The recent release of Erlang 23.0 removed support for loading beam
    modules compiled under R14 and earlier. Thus we're now forced to abandon
    support for R13 and R14.
---
 .gitignore |   1 +
 enc        | Bin 23313 -> 26053 bytes
 rebar      | Bin 131900 -> 206659 bytes
 3 files changed, 1 insertion(+)

diff --git a/.gitignore b/.gitignore
index c6154b9..d281c7b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,6 @@
 .eunit
 .rebar
+.tool-versions
 .jiffy.dev
 *.app
 *.beam
diff --git a/enc b/enc
index 3626e16..5338498 100755
Binary files a/enc and b/enc differ
diff --git a/rebar b/rebar
index 36ef011..b3eaa8e 100755
Binary files a/rebar and b/rebar differ


[couchdb-jiffy] 11/12: Fix support for R16

Posted by rn...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rnewson pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/couchdb-jiffy.git

commit 37039ba32e950480715be74751a53339420a6fe1
Author: Paul J. Davis <pa...@gmail.com>
AuthorDate: Mon Dec 14 15:29:37 2020 -0600

    Fix support for R16
---
 test/jiffy_15_return_trailer_tests.erl | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/test/jiffy_15_return_trailer_tests.erl b/test/jiffy_15_return_trailer_tests.erl
index 2e702fd..80937fa 100644
--- a/test/jiffy_15_return_trailer_tests.erl
+++ b/test/jiffy_15_return_trailer_tests.erl
@@ -18,6 +18,7 @@ trailer_test_() ->
         ?_assertEqual(Result, jiffy:decode(Data, Opts))
     end, Cases)}.
 
+-ifndef(JIFFY_NO_MAPS).
 
 trailer_bignum_test() ->
     Opts = [return_maps, return_trailer],
@@ -25,3 +26,5 @@ trailer_bignum_test() ->
     Obj = #{<<"amount">> => -50000000000000000000},
     Expect = {has_trailer, Obj, <<"{}">>},
     ?assertEqual(Expect, jiffy:decode(Data, Opts)).
+
+-endif.


[couchdb-jiffy] 03/12: Jiffy 1.0.5

Posted by rn...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rnewson pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/couchdb-jiffy.git

commit 6dadc0cd22b06e2b1972ee8aba5708c478418926
Author: Paul J. Davis <pa...@gmail.com>
AuthorDate: Tue Jun 30 12:26:27 2020 -0500

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

diff --git a/src/jiffy.app.src b/src/jiffy.app.src
index ad923c3..e3a43af 100644
--- a/src/jiffy.app.src
+++ b/src/jiffy.app.src
@@ -1,6 +1,6 @@
 {application, jiffy, [
     {description, "JSON Decoder/Encoder."},
-    {vsn, "1.0.4"},
+    {vsn, "1.0.5"},
     {registered, []},
     {applications, [kernel, stdlib, xmerl]},
     {maintainers, ["Paul J. Davis"]},


[couchdb-jiffy] 12/12: Merge remote-tracking branch 'davisp/master'

Posted by rn...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rnewson pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/couchdb-jiffy.git

commit 998b86258bfe30acf00832d2bc7c007a2210c0b8
Merge: 11ae49f 37039ba
Author: Robert Newson <rn...@apache.org>
AuthorDate: Tue Feb 16 17:30:06 2021 +0000

    Merge remote-tracking branch 'davisp/master'

 .gitignore                             |   1 +
 .travis.yml                            |   1 +
 Makefile                               |   4 ++++
 c_src/jiffy.c                          |   1 +
 c_src/jiffy.h                          |   1 +
 c_src/util.c                           |   2 +-
 enc                                    | Bin 23313 -> 26053 bytes
 src/jiffy.app.src                      |   2 +-
 src/jiffy.erl                          |   2 ++
 test/jiffy_15_return_trailer_tests.erl |  13 ++++++++++++-
 test/jiffy_17_copy_strings_tests.erl   |   2 +-
 test/jiffy_util.hrl                    |   3 +++
 12 files changed, 28 insertions(+), 4 deletions(-)

diff --cc .travis.yml
index 4a827cd,53bb22d..a53e42d
--- a/.travis.yml
+++ b/.travis.yml
@@@ -1,6 -1,9 +1,7 @@@
  language: erlang
 -notifications:
 -  email: paul.joseph.davis@gmail.com
 -script: make check
 +
  otp_release:
+    - 23.0
     - 22.2.4
     - 21.3.8.1
     - 20.3.8.22


[couchdb-jiffy] 08/12: Jiffy 1.0.7

Posted by rn...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rnewson pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/couchdb-jiffy.git

commit a3c36d652cc7f5f942d3f23ee9dd5a488746c70e
Author: Paul J. Davis <pa...@gmail.com>
AuthorDate: Thu Dec 10 10:04:05 2020 -0600

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

diff --git a/src/jiffy.app.src b/src/jiffy.app.src
index 6b08c2a..7047715 100644
--- a/src/jiffy.app.src
+++ b/src/jiffy.app.src
@@ -1,6 +1,6 @@
 {application, jiffy, [
     {description, "JSON Decoder/Encoder."},
-    {vsn, "1.0.6"},
+    {vsn, "1.0.7"},
     {registered, []},
     {applications, [kernel, stdlib, xmerl]},
     {maintainers, ["Paul J. Davis"]},


[couchdb-jiffy] 02/12: Silence compiler warnings for tests

Posted by rn...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rnewson pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/couchdb-jiffy.git

commit 685f14ef609d686c67997d14b376a932cdfa0adb
Author: Paul J. Davis <pa...@gmail.com>
AuthorDate: Tue Jun 30 12:20:18 2020 -0500

    Silence compiler warnings for tests
---
 .travis.yml                          | 1 +
 test/jiffy_17_copy_strings_tests.erl | 2 +-
 test/jiffy_util.hrl                  | 3 +++
 3 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/.travis.yml b/.travis.yml
index f63225f..53bb22d 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -3,6 +3,7 @@ notifications:
   email: paul.joseph.davis@gmail.com
 script: make check
 otp_release:
+   - 23.0
    - 22.2.4
    - 21.3.8.1
    - 20.3.8.22
diff --git a/test/jiffy_17_copy_strings_tests.erl b/test/jiffy_17_copy_strings_tests.erl
index 645ad96..359b997 100644
--- a/test/jiffy_17_copy_strings_tests.erl
+++ b/test/jiffy_17_copy_strings_tests.erl
@@ -17,7 +17,7 @@ check_binaries(Values) when is_list(Values) ->
 check_binaries(Bin) when is_binary(Bin) ->
     io:format("~s :: ~p ~p", [Bin, byte_size(Bin), binary:referenced_byte_size(Bin)]),
     byte_size(Bin) == binary:referenced_byte_size(Bin);
-check_binaries(Bin) ->
+check_binaries(_Bin) ->
     true.
 
 
diff --git a/test/jiffy_util.hrl b/test/jiffy_util.hrl
index 6002543..983f7e3 100644
--- a/test/jiffy_util.hrl
+++ b/test/jiffy_util.hrl
@@ -1,6 +1,9 @@
 % This file is part of Jiffy released under the MIT license.
 % See the LICENSE file for more information.
 
+-compile(export_all).
+-compile(nowarn_export_all).
+
 msg(Fmt, Args) ->
     M1 = io_lib:format(Fmt, Args),
     M2 = re:replace(M1, <<"\r">>, <<"\\\\r">>, [global]),