xot 0.1.37 → 0.1.39

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c387920c5f034e30d6efa3e4cf34b90b673231df23c77542f4a745e004fc89d3
4
- data.tar.gz: 5bc4ed56c3bbc96d9bc732d6278feb0ff713bd3efd6668214f6bcbd927c19826
3
+ metadata.gz: 53093155173a67381c3c56ba06d6ad9ba674085885b358ac86dfb416f10c2206
4
+ data.tar.gz: 86e4bd0a651e65e383e4a84c5fabedf1d95d90c37bd62eba561ab95e79c5b097
5
5
  SHA512:
6
- metadata.gz: ff6ecdd8b589c9ca5a6033a310f7cce29d42393b3db39895797880b3acaf911c50afd9ad0a7109fae177dfd308e826cb64a0477e6ee398a2bd5bae1ee14d4a31
7
- data.tar.gz: 39c88511227999cf5de84b79cdd587d732adaac3d4b6205faeb097d1fbd6bc6fbc4ef30684aebb95912c3b8eb3dbe0deaf146f678b1a1ee9691d83406c6ce4d0
6
+ metadata.gz: 24a5c22fde4448df51e4762beadf6b18560d8d5eae949d0418e9eb2f5200f24d0523d5580efb3f0c575442daaa947acaa02808a44cd8be4c6df927206a706d4d
7
+ data.tar.gz: 89685efc3ba261bc6f9c226f09297b5812f3f14511f75600209c6060245d750e3cbc5d6d5851ce99882f16e34aed0ef7d42a7d918c77f8b2ee3f586c8981a2be
data/ChangeLog.md CHANGED
@@ -1,6 +1,16 @@
1
1
  # xot ChangeLog
2
2
 
3
3
 
4
+ ## [v0.1.39] - 2023-06-11
5
+
6
+ - Add mask_flag()
7
+
8
+
9
+ ## [v0.1.38] - 2023-05-29
10
+
11
+ - Refactoring
12
+
13
+
4
14
  ## [v0.1.37] - 2023-05-27
5
15
 
6
16
  - required_ruby_version >= 3.0.0
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.37
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>
data/xot.gemspec CHANGED
@@ -1,10 +1,7 @@
1
1
  # -*- mode: ruby -*-
2
2
 
3
3
 
4
- File.expand_path('lib', __dir__)
5
- .tap {|s| $:.unshift s if !$:.include?(s) && File.directory?(s)}
6
-
7
- require 'xot/extension'
4
+ require_relative 'lib/xot/extension'
8
5
 
9
6
 
10
7
  Gem::Specification.new do |s|
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.37
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-27 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