hsss 0.1.19 → 0.1.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/exe/hsss +1 -1
- data/lib/hsss.rb +5 -4
- data/lib/hsss/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d82312d9d40fe7749258fe1e917963eca868efe1f21a5867b24531c988d9f423
|
|
4
|
+
data.tar.gz: ef2849d3bd39335bd3e1b19a10b61ca1c613230570db7b7a7792d0154d39943d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: fe53ce199038e44561d0f6dab8e00472618b879a94089d9333b369c4229047870e43139abbe9f53ba2ccd44333255e39370f6f4ea52d96de2e542644dc090475
|
|
7
|
+
data.tar.gz: 82aa9124e4bc30bd1b42de06715a89ae6af7344afeaf9be5e96d559116875d76c69412434b2d62e68e7ca7a5fb4d41d170b684ed78bf76350282b1b26b319875
|
data/exe/hsss
CHANGED
|
@@ -19,7 +19,7 @@ arg=OptionParser.new do |opts|
|
|
|
19
19
|
opts.on("--no-parse", "Skip using luac to check script syntax"){opt[:no_luac]=true}
|
|
20
20
|
opts.on("--no-static", "Don't make variables static (file-scoped)"){opt[:no_static]=true}
|
|
21
21
|
opts.on("--header-only", "just the header"){opt[:header_only]=true}
|
|
22
|
-
opts.on("--header-guard", "header guard string"){|v|opt[:header_guard]=v}
|
|
22
|
+
opts.on("--header-guard [LUA_SCRIPTS_H]", "header guard string"){|v|opt[:header_guard]=v}
|
|
23
23
|
opts.on("--data-only", "just the data"){opt[:data_only]=true}
|
|
24
24
|
opts.on("--prefix [#{Hsss::DEFAULT_PREFIX}]", "Prefix default names with this"){|v| opt[:prefix]=v}
|
|
25
25
|
end
|
data/lib/hsss.rb
CHANGED
|
@@ -44,7 +44,8 @@ module Hsss
|
|
|
44
44
|
@data_only = opt[:data_only]
|
|
45
45
|
@include_count = !opt[:skip_count]
|
|
46
46
|
@include_iter_macro = !opt[:skip_each]
|
|
47
|
-
@header_guard = opt[:header_guard]
|
|
47
|
+
@header_guard = opt[:header_guard] || "LUA_SCRIPTS_H"
|
|
48
|
+
@header_guard = false if @header_guard.length == 0
|
|
48
49
|
@include_hash = !!hashes_struct
|
|
49
50
|
|
|
50
51
|
(Array === files ? files : [ files ]).each do |f|
|
|
@@ -233,11 +234,11 @@ module Hsss
|
|
|
233
234
|
out << "#define #{@header_guard}\n"
|
|
234
235
|
end
|
|
235
236
|
out << sprintf(@headf, @struct.join("\n"))
|
|
236
|
-
out << "#{@static}#{struct_name} #{scripts_struct};\n"
|
|
237
|
-
out << "const int #{@count_name};\n" if @include_count
|
|
237
|
+
out << "extern #{@static}#{struct_name} #{scripts_struct};\n"
|
|
238
|
+
out << "extern const int #{@count_name};\n" if @include_count
|
|
238
239
|
out << iter_macro
|
|
239
240
|
if @header_guard
|
|
240
|
-
out << "#endif //#{@header_guard}\n"
|
|
241
|
+
out << "\n#endif //#{@header_guard}\n"
|
|
241
242
|
end
|
|
242
243
|
elsif @data_only
|
|
243
244
|
out << "#{@static}#{struct_name} #{scripts_struct} = {\n"
|
data/lib/hsss/version.rb
CHANGED