iodine 0.7.0 → 0.7.1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of iodine might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/.travis.yml +9 -3
- data/CHANGELOG.md +4 -0
- data/ext/iodine/extconf.rb +1 -2
- data/ext/iodine/fio.c +5 -0
- data/ext/iodine/fio.h +2 -8
- data/ext/iodine/fio_json_parser.h +1 -1
- data/ext/iodine/fiobject.h +1 -1
- data/ext/iodine/mustache_parser.h +3 -3
- data/lib/iodine/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1727f338fb31c8ab46956d8e3b45af0d374ce100771305ba73f5b690467cff54
|
4
|
+
data.tar.gz: ef706da6cd642d2de4a464e3a5b6b90c8afd5cec294456dde2fa841b625a222a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3d114bf645e22f6bef700c782dcfa3daa263d94bcadac5ecb543a67abe593884c86ea6eb6b9c99fb8480385f8e8f9c211ce27901645bf776b84a2d75b7ba1c61
|
7
|
+
data.tar.gz: f5029fd64683ffd485c8091686f5fc2e905abee7776d94c15c5d9b80cff3093a5147cffa502a45f1fe0d0d9de884909edc5ceac0c1a0cb565cb72d40dd5b994f
|
data/.travis.yml
CHANGED
@@ -4,6 +4,7 @@ os:
|
|
4
4
|
# - osx
|
5
5
|
before_install:
|
6
6
|
- gem install bundler -v 1.10.6
|
7
|
+
- bundle install
|
7
8
|
rvm:
|
8
9
|
- 2.5.0
|
9
10
|
- 2.4.0
|
@@ -20,6 +21,11 @@ addons:
|
|
20
21
|
packages:
|
21
22
|
- gcc-4.9
|
22
23
|
- gcc-5
|
23
|
-
|
24
|
-
|
25
|
-
|
24
|
+
script:
|
25
|
+
- gem uninstall -x iodine
|
26
|
+
- rake build
|
27
|
+
- find pkg/iodine-*.gem -exec gem install {} +
|
28
|
+
- gem uninstall -x iodine
|
29
|
+
- CC=gcc find pkg/iodine-*.gem -exec gem install {} +
|
30
|
+
- gem uninstall -x iodine
|
31
|
+
- CC=gcc-5 find pkg/iodine-*.gem -exec gem install {} +
|
data/CHANGELOG.md
CHANGED
@@ -6,6 +6,10 @@ Please notice that this change log contains changes for upcoming releases as wel
|
|
6
6
|
|
7
7
|
## Changes:
|
8
8
|
|
9
|
+
#### Change log v.0.7.1
|
10
|
+
|
11
|
+
**Fix**: Fixed compilation issues with older `gcc` compilers.
|
12
|
+
|
9
13
|
#### Change log v.0.7.0
|
10
14
|
|
11
15
|
This version bump is performed because the internal engine changed significantly and might be considered less mature. The public API remains unbroken.
|
data/ext/iodine/extconf.rb
CHANGED
@@ -4,8 +4,7 @@ abort 'Missing a Linux/Unix OS evented API (epoll/kqueue).' unless have_func('ke
|
|
4
4
|
|
5
5
|
if ENV['CC']
|
6
6
|
ENV['CPP'] ||= ENV['CC']
|
7
|
-
puts "detected user prefered compiler (#{ENV['CC']})
|
8
|
-
check_for_stdatomics
|
7
|
+
puts "detected user prefered compiler (#{ENV['CC']}):", `#{ENV['CC']} -v`
|
9
8
|
elsif find_executable('clang') && puts('testing clang for stdatomic support...').nil? && system("printf \"\#include <stdatomic.h>\nint main(void) {}\" | clang -include stdatomic.h -xc -o /dev/null -", out: '/dev/null')
|
10
9
|
$CC = ENV['CC'] = 'clang'
|
11
10
|
$CPP = ENV['CPP'] = 'clang'
|
data/ext/iodine/fio.c
CHANGED
@@ -7768,6 +7768,7 @@ FIO_FUNC inline void fio_str_test(void) {
|
|
7768
7768
|
FIO_ASSERT(s->ref == 1,
|
7769
7769
|
"`fio_str_dup` error, reference counter not incremented!");
|
7770
7770
|
|
7771
|
+
fprintf(stderr, "* reading a file.\n");
|
7771
7772
|
fio_str_info_s state = fio_str_readfile(s, __FILE__, 0, 0);
|
7772
7773
|
|
7773
7774
|
FIO_ASSERT(state.data,
|
@@ -7781,6 +7782,7 @@ FIO_FUNC inline void fio_str_test(void) {
|
|
7781
7782
|
80),
|
7782
7783
|
"`fio_str_readfile` content error, header mismatch!\n %s",
|
7783
7784
|
state.data);
|
7785
|
+
fprintf(stderr, "* testing UTF-8 validation and length.\n");
|
7784
7786
|
FIO_ASSERT(
|
7785
7787
|
fio_str_utf8_valid(s),
|
7786
7788
|
"`fio_str_utf8_valid` error, code in this file should be valid!");
|
@@ -7789,6 +7791,7 @@ FIO_FUNC inline void fio_str_test(void) {
|
|
7789
7791
|
"`fio_str_utf8_len` error, invalid value (%zu / %zu!",
|
7790
7792
|
fio_str_utf8_len(s), fio_str_len(s));
|
7791
7793
|
|
7794
|
+
fprintf(stderr, "* reviewing reference counting `fio_str_free2` (1/2).\n");
|
7792
7795
|
fio_str_free2(s2);
|
7793
7796
|
FIO_ASSERT(s->ref == 0,
|
7794
7797
|
"`fio_str_free2` error, reference counter not subtracted!");
|
@@ -7802,6 +7805,7 @@ FIO_FUNC inline void fio_str_test(void) {
|
|
7802
7805
|
/* String content == whole file (this file) */
|
7803
7806
|
intptr_t pos = -11;
|
7804
7807
|
size_t len = 20;
|
7808
|
+
fprintf(stderr, "* testing UTF-8 positioning.\n");
|
7805
7809
|
|
7806
7810
|
FIO_ASSERT(
|
7807
7811
|
fio_str_utf8_select(s, &pos, &len) == 0,
|
@@ -7826,6 +7830,7 @@ FIO_FUNC inline void fio_str_test(void) {
|
|
7826
7830
|
"`fio_str_utf8_select` error, length invalid! (%zd)",
|
7827
7831
|
(ssize_t)len);
|
7828
7832
|
}
|
7833
|
+
fprintf(stderr, "* reviewing reference counting `fio_str_free2` (2/2).\n");
|
7829
7834
|
fio_str_free2(s);
|
7830
7835
|
}
|
7831
7836
|
fio_str_free(&str);
|
data/ext/iodine/fio.h
CHANGED
@@ -190,7 +190,7 @@ Version and helper macros
|
|
190
190
|
#define __has_include(...) 0
|
191
191
|
#define __has_builtin(...) 0
|
192
192
|
#define FIO_GNUC_BYPASS 1
|
193
|
-
#elif !defined(__clang__) &&
|
193
|
+
#elif !defined(__clang__) && !defined(__has_builtin)
|
194
194
|
#define __has_builtin(...) 0
|
195
195
|
#define FIO_GNUC_BYPASS 1
|
196
196
|
#endif
|
@@ -226,12 +226,6 @@ Version and helper macros
|
|
226
226
|
|
227
227
|
#if DEBUG
|
228
228
|
#define FIO_LOG_DEBUG(...) FIO_LOG_STATE("INFO [DEBUG]: " __VA_ARGS__)
|
229
|
-
// #define FIO_ASSERT(cond, ...) \
|
230
|
-
// if (!(cond)) { \
|
231
|
-
// fprintf(stderr, "FATAL [DEBUG] (" __FILE__ \
|
232
|
-
// ":" FIO_MACRO2STR(__LINE__) "): " __VA_ARGS__); \
|
233
|
-
// exit(-1); \
|
234
|
-
// }
|
235
229
|
#define FIO_ASSERT(cond, ...) \
|
236
230
|
if (!(cond)) { \
|
237
231
|
fprintf(stderr, "FATAL [DEBUG] (" __FILE__ \
|
@@ -3798,7 +3792,7 @@ FIO_FUNC fio_str_info_s fio_str_readfile(fio_str_s *s, const char *filename,
|
|
3798
3792
|
#if defined(__unix__) || defined(__linux__) || defined(__APPLE__) || \
|
3799
3793
|
defined(__CYGWIN__)
|
3800
3794
|
/* POSIX implementations. */
|
3801
|
-
if (filename == NULL)
|
3795
|
+
if (filename == NULL || !s)
|
3802
3796
|
return state;
|
3803
3797
|
struct stat f_data;
|
3804
3798
|
int file = -1;
|
@@ -31,7 +31,7 @@
|
|
31
31
|
#define __has_include(...) 0
|
32
32
|
#define __has_builtin(...) 0
|
33
33
|
#define FIO_GNUC_BYPASS 1
|
34
|
-
#elif !defined(__clang__) &&
|
34
|
+
#elif !defined(__clang__) && !defined(__has_builtin)
|
35
35
|
#define __has_builtin(...) 0
|
36
36
|
#define FIO_GNUC_BYPASS 1
|
37
37
|
#endif
|
data/ext/iodine/fiobject.h
CHANGED
@@ -28,7 +28,7 @@ types, abstracting some complexity and making dynamic type related tasks easier.
|
|
28
28
|
#define __has_include(...) 0
|
29
29
|
#define __has_builtin(...) 0
|
30
30
|
#define FIO_GNUC_BYPASS 1
|
31
|
-
#elif !defined(__clang__) &&
|
31
|
+
#elif !defined(__clang__) && !defined(__has_builtin)
|
32
32
|
#define __has_builtin(...) 0
|
33
33
|
#define FIO_GNUC_BYPASS 1
|
34
34
|
#endif
|
@@ -79,7 +79,7 @@ Feel free to copy, use and enjoy according to the license provided.
|
|
79
79
|
#define __has_include(...) 0
|
80
80
|
#define __has_builtin(...) 0
|
81
81
|
#define FIO_GNUC_BYPASS 1
|
82
|
-
#elif !defined(__clang__) &&
|
82
|
+
#elif !defined(__clang__) && !defined(__has_builtin)
|
83
83
|
#define __has_builtin(...) 0
|
84
84
|
#define FIO_GNUC_BYPASS 1
|
85
85
|
#endif
|
@@ -662,7 +662,7 @@ MUSTACHE_FUNC mustache_s *(mustache_load)(mustache_load_args_s args) {
|
|
662
662
|
exit(errno); \
|
663
663
|
} \
|
664
664
|
} \
|
665
|
-
if ((folder_len) && (filename)[0] != '/') {
|
665
|
+
if (path != (char *)(folder) && (folder_len) && (filename)[0] != '/') { \
|
666
666
|
memcpy(path, (folder), (folder_len)); \
|
667
667
|
path_len = (folder_len); \
|
668
668
|
} else { \
|
@@ -795,7 +795,7 @@ MUSTACHE_FUNC mustache_s *(mustache_load)(mustache_load_args_s args) {
|
|
795
795
|
}
|
796
796
|
|
797
797
|
/* Our first template to load is the root template */
|
798
|
-
LOAD_TEMPLATE(
|
798
|
+
LOAD_TEMPLATE(path, 0, args.filename, args.filename_len);
|
799
799
|
|
800
800
|
/*** As long as the stack has templated to parse - parse the template ***/
|
801
801
|
while (stack_pos) {
|
data/lib/iodine/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: iodine
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Boaz Segev
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-09-
|
11
|
+
date: 2018-09-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rack
|