rbs 3.5.0 → 3.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +11 -0
- data/ext/rbs_extension/location.c +5 -4
- data/ext/rbs_extension/location.h +4 -2
- data/lib/rbs/version.rb +1 -1
- data/rbs.gemspec +1 -0
- metadata +18 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3dc7a972ca885618f8bcb3beb35d5096ddd9cc3dc6880fb6ae6b06d4a1845be0
|
4
|
+
data.tar.gz: 3fd84cf6a4869385f16e98cb1319855fcc1fcc242e16731b6bbdd5d249f1df8a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0b79dcac9fa9f94eff95b2c098208784f45e8ee891b94202f8e82886d15e0af04bbb26acdff5428277470536cfef164f79b5a1f73ded288b320600bd15568500
|
7
|
+
data.tar.gz: c0c6f53213e0b0aac09747c2aef470548b2b872b8ace2647ebdedca292a55b8aa0dbbebfa5c3ff75c47d3f76e87643f23f75883cacc49726fd778f95e1c3ee9e
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,16 @@
|
|
1
1
|
# CHANGELOG
|
2
2
|
|
3
|
+
## 3.5.1 (2024-06-07)
|
4
|
+
|
5
|
+
### Library changes
|
6
|
+
|
7
|
+
* Add explicit dependency on the `logger` gem ([#1865](https://github.com/ruby/rbs/pull/1865))
|
8
|
+
* Make c99, c23 compatible ([#1870](https://github.com/ruby/rbs/pull/1870))
|
9
|
+
|
10
|
+
### Miscellaneous
|
11
|
+
|
12
|
+
* Don't try to sign git commits when running tests ([#1867](https://github.com/ruby/rbs/pull/1867))
|
13
|
+
|
3
14
|
## 3.5.0 (2024-06-06)
|
4
15
|
|
5
16
|
### Signature updates
|
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
#define RBS_LOC_REQUIRED_P(loc, i) ((loc)->children->required_p & (1 << (i)))
|
4
4
|
#define RBS_LOC_OPTIONAL_P(loc, i) (!RBS_LOC_REQUIRED_P((loc), (i)))
|
5
|
+
#define RBS_LOC_CHILDREN_SIZE(cap) (sizeof(rbs_loc_children) + sizeof(rbs_loc_entry) * ((cap) - 1))
|
5
6
|
|
6
7
|
VALUE RBS_Location;
|
7
8
|
|
@@ -25,7 +26,7 @@ static void check_children_max(unsigned short n) {
|
|
25
26
|
void rbs_loc_alloc_children(rbs_loc *loc, unsigned short cap) {
|
26
27
|
check_children_max(cap);
|
27
28
|
|
28
|
-
size_t s =
|
29
|
+
size_t s = RBS_LOC_CHILDREN_SIZE(cap);
|
29
30
|
loc->children = malloc(s);
|
30
31
|
|
31
32
|
loc->children->len = 0;
|
@@ -39,7 +40,7 @@ static void check_children_cap(rbs_loc *loc) {
|
|
39
40
|
} else {
|
40
41
|
if (loc->children->len == loc->children->cap) {
|
41
42
|
check_children_max(loc->children->cap + 1);
|
42
|
-
size_t s =
|
43
|
+
size_t s = RBS_LOC_CHILDREN_SIZE(++loc->children->cap);
|
43
44
|
loc->children = realloc(loc->children, s);
|
44
45
|
}
|
45
46
|
}
|
@@ -85,7 +86,7 @@ static size_t rbs_loc_memsize(const void *ptr) {
|
|
85
86
|
if (loc->children == NULL) {
|
86
87
|
return sizeof(rbs_loc);
|
87
88
|
} else {
|
88
|
-
return sizeof(rbs_loc) +
|
89
|
+
return sizeof(rbs_loc) + RBS_LOC_CHILDREN_SIZE(loc->children->cap);
|
89
90
|
}
|
90
91
|
}
|
91
92
|
|
@@ -129,7 +130,7 @@ static VALUE location_initialize_copy(VALUE self, VALUE other) {
|
|
129
130
|
self_loc->rg = other_loc->rg;
|
130
131
|
if (other_loc->children != NULL) {
|
131
132
|
rbs_loc_alloc_children(self_loc, other_loc->children->cap);
|
132
|
-
memcpy(self_loc->children, other_loc->children,
|
133
|
+
memcpy(self_loc->children, other_loc->children, RBS_LOC_CHILDREN_SIZE(other_loc->children->cap));
|
133
134
|
}
|
134
135
|
|
135
136
|
return Qnil;
|
@@ -16,17 +16,19 @@ typedef struct {
|
|
16
16
|
|
17
17
|
typedef unsigned int rbs_loc_entry_bitmap;
|
18
18
|
|
19
|
+
// The flexible array always allocates, but it's okay.
|
20
|
+
// This struct is not allocated when the `rbs_loc` doesn't have children.
|
19
21
|
typedef struct {
|
20
22
|
unsigned short len;
|
21
23
|
unsigned short cap;
|
22
24
|
rbs_loc_entry_bitmap required_p;
|
23
|
-
rbs_loc_entry entries[
|
25
|
+
rbs_loc_entry entries[1];
|
24
26
|
} rbs_loc_children;
|
25
27
|
|
26
28
|
typedef struct {
|
27
29
|
VALUE buffer;
|
28
30
|
range rg;
|
29
|
-
rbs_loc_children *children;
|
31
|
+
rbs_loc_children *children; // NULL when no children is allocated
|
30
32
|
} rbs_loc;
|
31
33
|
|
32
34
|
/**
|
data/lib/rbs/version.rb
CHANGED
data/rbs.gemspec
CHANGED
metadata
CHANGED
@@ -1,15 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rbs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.5.
|
4
|
+
version: 3.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Soutaro Matsumoto
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-06-
|
12
|
-
dependencies:
|
11
|
+
date: 2024-06-07 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: logger
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
13
27
|
description: RBS is the language for type signatures for Ruby and standard library
|
14
28
|
definitions.
|
15
29
|
email:
|
@@ -513,7 +527,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
513
527
|
- !ruby/object:Gem::Version
|
514
528
|
version: '0'
|
515
529
|
requirements: []
|
516
|
-
rubygems_version: 3.5.
|
530
|
+
rubygems_version: 3.5.3
|
517
531
|
signing_key:
|
518
532
|
specification_version: 4
|
519
533
|
summary: Type signature for Ruby.
|