xot 0.1.38 → 0.1.39

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/ChangeLog.md +5 -0
  3. data/VERSION +1 -1
  4. data/include/xot/util.h +8 -1
  5. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 70ef8d346d272678d1c09f8049c30fc999a9df3f93305b439bb876b39e45d2d1
4
- data.tar.gz: baad19acaadf8fa7686e090292d948ecfaf39304a967f1a456fab40a7ce1b31f
3
+ metadata.gz: 53093155173a67381c3c56ba06d6ad9ba674085885b358ac86dfb416f10c2206
4
+ data.tar.gz: 86e4bd0a651e65e383e4a84c5fabedf1d95d90c37bd62eba561ab95e79c5b097
5
5
  SHA512:
6
- metadata.gz: d28323fc4973cc91da9c6a0b4ff7dfde3c4872d7f254737beea20033d0aa3bd66b95bce3e046b704d7abcc9bbfb2566e90aa6d3d9528cab3579d933a850a7a95
7
- data.tar.gz: da95f79ad18932b40a6eae1c69795286f0825e1d36b8ff84fd19a9852657a859941c00e84e4604b18272252468f5f6ee2ca391e9388c9c308a0d1f7c603def91
6
+ metadata.gz: 24a5c22fde4448df51e4762beadf6b18560d8d5eae949d0418e9eb2f5200f24d0523d5580efb3f0c575442daaa947acaa02808a44cd8be4c6df927206a706d4d
7
+ data.tar.gz: 89685efc3ba261bc6f9c226f09297b5812f3f14511f75600209c6060245d750e3cbc5d6d5851ce99882f16e34aed0ef7d42a7d918c77f8b2ee3f586c8981a2be
data/ChangeLog.md CHANGED
@@ -1,6 +1,11 @@
1
1
  # xot ChangeLog
2
2
 
3
3
 
4
+ ## [v0.1.39] - 2023-06-11
5
+
6
+ - Add mask_flag()
7
+
8
+
4
9
  ## [v0.1.38] - 2023-05-29
5
10
 
6
11
  - Refactoring
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.38
1
+ 0.1.39
data/include/xot/util.h CHANGED
@@ -73,12 +73,19 @@ namespace Xot
73
73
  *pvalue &= ~flag;
74
74
  }
75
75
 
76
+ template <typename T>
77
+ inline uint
78
+ mask_flag (T value, uint mask)
79
+ {
80
+ return value & mask;
81
+ }
82
+
76
83
  template <typename T>
77
84
  inline bool
78
85
  has_flag (T value, uint flag)
79
86
  {
80
87
  if (flag == 0) return false;
81
- return (value & flag) == flag;
88
+ return mask_flag(value, flag) == flag;
82
89
  }
83
90
 
84
91
  template <typename T>
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xot
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.38
4
+ version: 0.1.39
5
5
  platform: ruby
6
6
  authors:
7
7
  - xordog
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-05-29 00:00:00.000000000 Z
11
+ date: 2023-06-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake