You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by va...@apache.org on 2021/11/24 17:24:51 UTC

[couchdb] branch cleanup-couch-ejson-compare created (now 9d4c930)

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

vatamane pushed a change to branch cleanup-couch-ejson-compare
in repository https://gitbox.apache.org/repos/asf/couchdb.git.


      at 9d4c930  Cleanup couch_ejson_compare C module

This branch includes the following new commits:

     new 9d4c930  Cleanup couch_ejson_compare C module

The 1 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.


[couchdb] 01/01: Cleanup couch_ejson_compare C module

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

vatamane pushed a commit to branch cleanup-couch-ejson-compare
in repository https://gitbox.apache.org/repos/asf/couchdb.git

commit 9d4c930ddca1d54c3314afa458934f89ec67673b
Author: Nick Vatamaniuc <va...@gmail.com>
AuthorDate: Wed Nov 24 12:22:16 2021 -0500

    Cleanup couch_ejson_compare C module
    
    Add `static` modifiers to some of the newer functions.
    
    Fix function protype for get_collator to be `void`. This squashes this warning
    on MS compiler:
    
    ```
    'get_collator': no function prototype given: converting '()' to '(void)'
    ```
---
 src/couch/priv/couch_ejson_compare/couch_ejson_compare.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/couch/priv/couch_ejson_compare/couch_ejson_compare.c b/src/couch/priv/couch_ejson_compare/couch_ejson_compare.c
index 6e20032..e433c8e 100644
--- a/src/couch/priv/couch_ejson_compare/couch_ejson_compare.c
+++ b/src/couch/priv/couch_ejson_compare/couch_ejson_compare.c
@@ -62,6 +62,9 @@ static int64_t loadEpoch = 0;
 static ErlNifMutex* collMutex = NULL;
 
 static ERL_NIF_TERM less_json_nif(ErlNifEnv*, int, const ERL_NIF_TERM []);
+static ERL_NIF_TERM compare_strings_nif(ErlNifEnv*, int, const ERL_NIF_TERM []);
+static ERL_NIF_TERM get_icu_version(ErlNifEnv*, int, const ERL_NIF_TERM []);
+static ERL_NIF_TERM get_uca_version(ErlNifEnv*, int, const ERL_NIF_TERM []);
 static int on_load(ErlNifEnv*, void**, ERL_NIF_TERM);
 static void on_unload(ErlNifEnv*, void*);
 static __inline int less_json(int, ctx_t*, ERL_NIF_TERM, ERL_NIF_TERM);
@@ -69,7 +72,8 @@ static __inline int atom_sort_order(ErlNifEnv*, ERL_NIF_TERM);
 static __inline int compare_strings(ctx_t*, ErlNifBinary, ErlNifBinary);
 static __inline int compare_lists(int, ctx_t*, ERL_NIF_TERM, ERL_NIF_TERM);
 static __inline int compare_props(int, ctx_t*, ERL_NIF_TERM, ERL_NIF_TERM);
-static __inline UCollator* get_collator();
+static __inline int is_max_utf8_marker(ErlNifBinary bin);
+static __inline UCollator* get_collator(void);
 
 /* Should match the <<255,255,255,255>> in:
  *  - src/mango/src/mango_idx_view.hrl#L13
@@ -78,7 +82,7 @@ static const unsigned char max_utf8_marker[]  = {255, 255, 255, 255};
 
 
 UCollator*
-get_collator()
+get_collator(void)
 {
     UErrorCode status = U_ZERO_ERROR;