Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e01f143

Browse files
author
Daniel Lemire
committed
Bumping up the version number
1 parent 187084c commit e01f143

File tree

6 files changed

+65
-59
lines changed

6 files changed

+65
-59
lines changed

CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ project(simdjson
66
)
77

88
set(PROJECT_VERSION_MAJOR 0)
9-
set(PROJECT_VERSION_MINOR 3)
10-
set(PROJECT_VERSION_PATCH 1)
11-
set(SIMDJSON_LIB_VERSION "0.3.1" CACHE STRING "simdjson library version")
12-
set(SIMDJSON_LIB_SOVERSION "1" CACHE STRING "simdjson library soversion")
9+
set(PROJECT_VERSION_MINOR 4)
10+
set(PROJECT_VERSION_PATCH 0)
11+
set(SIMDJSON_LIB_VERSION "0.4.0" CACHE STRING "simdjson library version")
12+
set(SIMDJSON_LIB_SOVERSION "2" CACHE STRING "simdjson library soversion")
1313
set(SIMDJSON_GITHUB_REPOSITORY https://github.com/simdjson/simdjson)
1414

1515
include(GNUInstallDirs)

Doxyfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ PROJECT_NAME = simdjson
3838
# could be handy for archiving the generated documentation or if some version
3939
# control system is used.
4040

41-
PROJECT_NUMBER = "0.3.1"
41+
PROJECT_NUMBER = "0.4.0"
4242

4343
# Using the PROJECT_BRIEF tag one can provide an optional one line description
4444
# for a project that appears at the top of each page and should give viewer a

include/simdjson/simdjson_version.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#define SIMDJSON_SIMDJSON_VERSION_H
55

66
/** The version of simdjson being used (major.minor.revision) */
7-
#define SIMDJSON_VERSION 0.3.1
7+
#define SIMDJSON_VERSION 0.4.0
88

99
namespace simdjson {
1010
enum {
@@ -15,11 +15,11 @@ enum {
1515
/**
1616
* The minor version (major.MINOR.revision) of simdjson being used.
1717
*/
18-
SIMDJSON_VERSION_MINOR = 3,
18+
SIMDJSON_VERSION_MINOR = 4,
1919
/**
2020
* The revision (major.minor.REVISION) of simdjson being used.
2121
*/
22-
SIMDJSON_VERSION_REVISION = 1
22+
SIMDJSON_VERSION_REVISION = 0
2323
};
2424
} // namespace simdjson
2525

singleheader/amalgamate_demo.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* auto-generated on Tue Jun 23 09:15:19 PDT 2020. Do not edit! */
1+
/* auto-generated on Tue 23 Jun 2020 20:51:12 EDT. Do not edit! */
22

33
#include <iostream>
44
#include "simdjson.h"

singleheader/simdjson.cpp

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* auto-generated on Tue Jun 23 09:15:19 PDT 2020. Do not edit! */
1+
/* auto-generated on Tue 23 Jun 2020 20:51:12 EDT. Do not edit! */
22
/* begin file src/simdjson.cpp */
33
#include "simdjson.h"
44

@@ -2850,8 +2850,6 @@ struct buf_block_reader {
28502850
size_t idx;
28512851
};
28522852

2853-
constexpr const int TITLE_SIZE = 12;
2854-
28552853
// Routines to print masks and text for debugging bitmask operations
28562854
UNUSED static char * format_input_text_64(const uint8_t *text) {
28572855
static char *buf = (char*)malloc(sizeof(simd8x64<uint8_t>) + 1);
@@ -8310,8 +8308,6 @@ struct buf_block_reader {
83108308
size_t idx;
83118309
};
83128310

8313-
constexpr const int TITLE_SIZE = 12;
8314-
83158311
// Routines to print masks and text for debugging bitmask operations
83168312
UNUSED static char * format_input_text_64(const uint8_t *text) {
83178313
static char *buf = (char*)malloc(sizeof(simd8x64<uint8_t>) + 1);
@@ -11587,8 +11583,6 @@ struct buf_block_reader {
1158711583
size_t idx;
1158811584
};
1158911585

11590-
constexpr const int TITLE_SIZE = 12;
11591-
1159211586
// Routines to print masks and text for debugging bitmask operations
1159311587
UNUSED static char * format_input_text_64(const uint8_t *text) {
1159411588
static char *buf = (char*)malloc(sizeof(simd8x64<uint8_t>) + 1);

singleheader/simdjson.h

Lines changed: 55 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* auto-generated on Tue Jun 23 09:15:19 PDT 2020. Do not edit! */
1+
/* auto-generated on Tue 23 Jun 2020 20:51:12 EDT. Do not edit! */
22
/* begin file include/simdjson.h */
33
#ifndef SIMDJSON_H
44
#define SIMDJSON_H
@@ -389,6 +389,7 @@ constexpr size_t DEFAULT_MAX_DEPTH = 1024;
389389
SIMDJSON_DISABLE_GCC_WARNING(-Wextra) \
390390
SIMDJSON_DISABLE_GCC_WARNING(-Wattributes) \
391391
SIMDJSON_DISABLE_GCC_WARNING(-Wimplicit-fallthrough) \
392+
SIMDJSON_DISABLE_GCC_WARNING(-Wnon-virtual-dtor) \
392393
SIMDJSON_DISABLE_GCC_WARNING(-Wreturn-type) \
393394
SIMDJSON_DISABLE_GCC_WARNING(-Wshadow) \
394395
SIMDJSON_DISABLE_GCC_WARNING(-Wunused-parameter) \
@@ -2017,7 +2018,7 @@ SIMDJSON_DISABLE_UNDESIRED_WARNINGS
20172018
#define SIMDJSON_SIMDJSON_VERSION_H
20182019
20192020
/** The version of simdjson being used (major.minor.revision) */
2020-
#define SIMDJSON_VERSION 0.3.1
2021+
#define SIMDJSON_VERSION 0.4.0
20212022
20222023
namespace simdjson {
20232024
enum {
@@ -2028,11 +2029,11 @@ enum {
20282029
/**
20292030
* The minor version (major.MINOR.revision) of simdjson being used.
20302031
*/
2031-
SIMDJSON_VERSION_MINOR = 3,
2032+
SIMDJSON_VERSION_MINOR = 4,
20322033
/**
20332034
* The revision (major.minor.REVISION) of simdjson being used.
20342035
*/
2035-
SIMDJSON_VERSION_REVISION = 1
2036+
SIMDJSON_VERSION_REVISION = 0
20362037
};
20372038
} // namespace simdjson
20382039
@@ -2082,7 +2083,8 @@ enum error_code {
20822083
* Get the error message for the given error code.
20832084
*
20842085
* dom::parser parser;
2085-
* auto [doc, error] = parser.parse("foo");
2086+
* dom::element doc;
2087+
* auto error = parser.parse("foo").get(doc);
20862088
* if (error) { printf("Error: %s\n", error_message(error)); }
20872089
*
20882090
* @return The error message.
@@ -2335,7 +2337,7 @@ struct padded_string final {
23352337
/**
23362338
* Create a new padded string by copying the given input.
23372339
*
2338-
* @param str_ the string to copy
2340+
* @param sv_ the string to copy
23392341
*/
23402342
inline padded_string(std::string_view sv_) noexcept;
23412343
/**
@@ -3095,7 +3097,7 @@ class array {
30953097
* Get the value associated with the given JSON pointer.
30963098
*
30973099
* dom::parser parser;
3098-
* array a = parser.parse(R"([ { "foo": { "a": [ 10, 20, 30 ] }} ])");
3100+
* array a = parser.parse(R"([ { "foo": { "a": [ 10, 20, 30 ] }} ])"_padded);
30993101
* a.at("0/foo/a/1") == 20
31003102
* a.at("0")["foo"]["a"].at(1) == 20
31013103
*
@@ -3434,9 +3436,13 @@ class parser {
34343436
* the same interface, requiring you to check the error before using the document:
34353437
*
34363438
* dom::parser parser;
3437-
* for (auto [doc, error] : parser.load_many(path)) {
3438-
* if (error) { cerr << error << endl; exit(1); }
3439-
* cout << std::string(doc["title"]) << endl;
3439+
* dom::document_stream docs;
3440+
* auto error = parser.load_many(path).get(docs);
3441+
* if (error) { cerr << error << endl; exit(1); }
3442+
* for (auto doc : docs) {
3443+
* std::string_view title;
3444+
* if ((error = doc["title"].get(title)) { cerr << error << endl; exit(1); }
3445+
* cout << title << endl;
34403446
* }
34413447
*
34423448
* ### Threads
@@ -3449,7 +3455,7 @@ class parser {
34493455
* If the parser's current capacity is less than batch_size, it will allocate enough capacity
34503456
* to handle it (up to max_capacity).
34513457
*
3452-
* @param s The concatenated JSON to parse. Must have at least len + SIMDJSON_PADDING allocated bytes.
3458+
* @param path File name pointing at the concatenated JSON to parse.
34533459
* @param batch_size The batch size to use. MUST be larger than the largest document. The sweet
34543460
* spot is cache-related: small enough to fit in cache, yet big enough to
34553461
* parse as many documents as possible in one tight loop.
@@ -3494,9 +3500,13 @@ class parser {
34943500
* the same interface, requiring you to check the error before using the document:
34953501
*
34963502
* dom::parser parser;
3497-
* for (auto [doc, error] : parser.parse_many(buf, len)) {
3498-
* if (error) { cerr << error << endl; exit(1); }
3499-
* cout << std::string(doc["title"]) << endl;
3503+
* dom::document_stream docs;
3504+
* auto error = parser.load_many(path).get(docs);
3505+
* if (error) { cerr << error << endl; exit(1); }
3506+
* for (auto doc : docs) {
3507+
* std::string_view title;
3508+
* if ((error = doc["title"].get(title)) { cerr << error << endl; exit(1); }
3509+
* cout << title << endl;
35003510
* }
35013511
*
35023512
* ### REQUIRED: Buffer Padding
@@ -4120,7 +4130,6 @@ class element {
41204130
* - Object: dom::object
41214131
*
41224132
* @tparam T bool, double, uint64_t, int64_t, std::string_view, const char *, dom::array, dom::object
4123-
* @returns true if the value can be cast to the given type, false if not.
41244133
*/
41254134
template<typename T>
41264135
really_inline bool is() const noexcept;
@@ -4273,8 +4282,8 @@ class element {
42734282
* The key will be matched against **unescaped** JSON:
42744283
*
42754284
* dom::parser parser;
4276-
* parser.parse(R"({ "a\n": 1 })")["a\n"].get<uint64_t>().value == 1
4277-
* parser.parse(R"({ "a\n": 1 })")["a\\n"].get<uint64_t>().error == NO_SUCH_FIELD
4285+
* parser.parse(R"({ "a\n": 1 })"_padded)["a\n"].get<uint64_t>().first == 1
4286+
* parser.parse(R"({ "a\n": 1 })"_padded)["a\\n"].get<uint64_t>().error() == NO_SUCH_FIELD
42784287
*
42794288
* @return The value associated with this field, or:
42804289
* - NO_SUCH_FIELD if the field does not exist in the object
@@ -4288,8 +4297,8 @@ class element {
42884297
* The key will be matched against **unescaped** JSON:
42894298
*
42904299
* dom::parser parser;
4291-
* parser.parse(R"({ "a\n": 1 })")["a\n"].get<uint64_t>().value == 1
4292-
* parser.parse(R"({ "a\n": 1 })")["a\\n"].get<uint64_t>().error == NO_SUCH_FIELD
4300+
* parser.parse(R"({ "a\n": 1 })"_padded)["a\n"].get<uint64_t>().first == 1
4301+
* parser.parse(R"({ "a\n": 1 })"_padded)["a\\n"].get<uint64_t>().error() == NO_SUCH_FIELD
42934302
*
42944303
* @return The value associated with this field, or:
42954304
* - NO_SUCH_FIELD if the field does not exist in the object
@@ -4301,7 +4310,7 @@ class element {
43014310
* Get the value associated with the given JSON pointer.
43024311
*
43034312
* dom::parser parser;
4304-
* element doc = parser.parse(R"({ "foo": { "a": [ 10, 20, 30 ] }})");
4313+
* element doc = parser.parse(R"({ "foo": { "a": [ 10, 20, 30 ] }})"_padded);
43054314
* doc.at("/foo/a/1") == 20
43064315
* doc.at("/")["foo"]["a"].at(1) == 20
43074316
* doc.at("")["foo"]["a"].at(1) == 20
@@ -4328,8 +4337,8 @@ class element {
43284337
* The key will be matched against **unescaped** JSON:
43294338
*
43304339
* dom::parser parser;
4331-
* parser.parse(R"({ "a\n": 1 })")["a\n"].get<uint64_t>().value == 1
4332-
* parser.parse(R"({ "a\n": 1 })")["a\\n"].get<uint64_t>().error == NO_SUCH_FIELD
4340+
* parser.parse(R"({ "a\n": 1 })"_padded)["a\n"].get<uint64_t>().first == 1
4341+
* parser.parse(R"({ "a\n": 1 })"_padded)["a\\n"].get<uint64_t>().error() == NO_SUCH_FIELD
43334342
*
43344343
* @return The value associated with this field, or:
43354344
* - NO_SUCH_FIELD if the field does not exist in the object
@@ -4557,8 +4566,8 @@ class object {
45574566
* The key will be matched against **unescaped** JSON:
45584567
*
45594568
* dom::parser parser;
4560-
* parser.parse(R"({ "a\n": 1 })")["a\n"].get<uint64_t>().value == 1
4561-
* parser.parse(R"({ "a\n": 1 })")["a\\n"].get<uint64_t>().error == NO_SUCH_FIELD
4569+
* parser.parse(R"({ "a\n": 1 })"_padded)["a\n"].get<uint64_t>().first == 1
4570+
* parser.parse(R"({ "a\n": 1 })"_padded)["a\\n"].get<uint64_t>().error() == NO_SUCH_FIELD
45624571
*
45634572
* This function has linear-time complexity: the keys are checked one by one.
45644573
*
@@ -4574,8 +4583,8 @@ class object {
45744583
* The key will be matched against **unescaped** JSON:
45754584
*
45764585
* dom::parser parser;
4577-
* parser.parse(R"({ "a\n": 1 })")["a\n"].get<uint64_t>().value == 1
4578-
* parser.parse(R"({ "a\n": 1 })")["a\\n"].get<uint64_t>().error == NO_SUCH_FIELD
4586+
* parser.parse(R"({ "a\n": 1 })"_padded)["a\n"].get<uint64_t>().first == 1
4587+
* parser.parse(R"({ "a\n": 1 })"_padded)["a\\n"].get<uint64_t>().error() == NO_SUCH_FIELD
45794588
*
45804589
* This function has linear-time complexity: the keys are checked one by one.
45814590
*
@@ -4589,7 +4598,7 @@ class object {
45894598
* Get the value associated with the given JSON pointer.
45904599
*
45914600
* dom::parser parser;
4592-
* object obj = parser.parse(R"({ "foo": { "a": [ 10, 20, 30 ] }})");
4601+
* object obj = parser.parse(R"({ "foo": { "a": [ 10, 20, 30 ] }})"_padded);
45934602
* obj.at("foo/a/1") == 20
45944603
* obj.at("foo")["a"].at(1) == 20
45954604
*
@@ -4607,8 +4616,8 @@ class object {
46074616
* The key will be matched against **unescaped** JSON:
46084617
*
46094618
* dom::parser parser;
4610-
* parser.parse(R"({ "a\n": 1 })")["a\n"].get<uint64_t>().value == 1
4611-
* parser.parse(R"({ "a\n": 1 })")["a\\n"].get<uint64_t>().error == NO_SUCH_FIELD
4619+
* parser.parse(R"({ "a\n": 1 })"_padded)["a\n"].get<uint64_t>().first == 1
4620+
* parser.parse(R"({ "a\n": 1 })"_padded)["a\\n"].get<uint64_t>().error() == NO_SUCH_FIELD
46124621
*
46134622
* This function has linear-time complexity: the keys are checked one by one.
46144623
*
@@ -4646,7 +4655,9 @@ class object {
46464655
*/
46474656
class key_value_pair {
46484657
public:
4658+
/** key in the key-value pair **/
46494659
std::string_view key;
4660+
/** value in the key-value pair **/
46504661
element value;
46514662

46524663
private:
@@ -4956,6 +4967,7 @@ inline std::ostream& operator<<(std::ostream& out, const escape_json_string &une
49564967

49574968
namespace simdjson {
49584969

4970+
/** @private **/
49594971
class [[deprecated("Use the new DOM navigation API instead (see doc/basics.md)")]] dom::parser::Iterator {
49604972
public:
49614973
inline Iterator(const dom::parser &parser) noexcept(false);
@@ -5044,11 +5056,11 @@ class [[deprecated("Use the new DOM navigation API instead (see doc/basics.md)")
50445056

50455057
inline bool is_string() const { return get_type() == '"'; }
50465058

5047-
// Returns true if the current type of node is an signed integer.
5059+
// Returns true if the current type of the node is an signed integer.
50485060
// You can get its value with `get_integer()`.
50495061
inline bool is_integer() const { return get_type() == 'l'; }
50505062

5051-
// Returns true if the current type of node is an unsigned integer.
5063+
// Returns true if the current type of the node is an unsigned integer.
50525064
// You can get its value with `get_unsigned_integer()`.
50535065
//
50545066
// NOTE:
@@ -5057,19 +5069,19 @@ class [[deprecated("Use the new DOM navigation API instead (see doc/basics.md)")
50575069
// positive integer, such as 1, 42, or 1000000, is as a signed node.
50585070
// Be aware this function returns false for a signed node.
50595071
inline bool is_unsigned_integer() const { return get_type() == 'u'; }
5060-
5072+
// Returns true if the current type of the node is a double floating-point number.
50615073
inline bool is_double() const { return get_type() == 'd'; }
5062-
5074+
// Returns true if the current type of the node is a number (integer or floating-point).
50635075
inline bool is_number() const {
50645076
return is_integer() || is_unsigned_integer() || is_double();
50655077
}
5066-
5078+
// Returns true if the current type of the node is a bool with true value.
50675079
inline bool is_true() const { return get_type() == 't'; }
5068-
5080+
// Returns true if the current type of the node is a bool with false value.
50695081
inline bool is_false() const { return get_type() == 'f'; }
5070-
5082+
// Returns true if the current type of the node is null.
50715083
inline bool is_null() const { return get_type() == 'n'; }
5072-
5084+
// Returns true if the type byte represents an object of an array
50735085
static bool is_object_or_array(uint8_t type) {
50745086
return ((type == '[') || (type == '{'));
50755087
}
@@ -5183,15 +5195,10 @@ class [[deprecated("Use the new DOM navigation API instead (see doc/basics.md)")
51835195
;
51845196
}
51855197

5186-
// void to_end_scope(); // move us to
5187-
// the start of our current scope; always succeeds
5198+
51885199

51895200
// print the node we are currently pointing at
51905201
inline bool print(std::ostream &os, bool escape_strings = true) const;
5191-
typedef struct {
5192-
size_t start_of_scope;
5193-
uint8_t scope_type;
5194-
} scopeindex_t;
51955202

51965203
private:
51975204
const document &doc;
@@ -5201,6 +5208,11 @@ class [[deprecated("Use the new DOM navigation API instead (see doc/basics.md)")
52015208
size_t tape_length{};
52025209
uint8_t current_type{};
52035210
uint64_t current_val{};
5211+
typedef struct {
5212+
size_t start_of_scope;
5213+
uint8_t scope_type;
5214+
} scopeindex_t;
5215+
52045216
scopeindex_t *depth_index{};
52055217
};
52065218

0 commit comments

Comments
 (0)