hsss 0.1.19 → 0.1.20

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/exe/hsss +1 -1
  3. data/lib/hsss.rb +5 -4
  4. data/lib/hsss/version.rb +1 -1
  5. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 96bbfca29172fb609c9de7699b81e89c02e0b7539e63a5632f963e2202940031
4
- data.tar.gz: 210afcafd9fd2829ae7cc1865150acd329a175d9b9afc1506dd81d3bd10c9778
3
+ metadata.gz: d82312d9d40fe7749258fe1e917963eca868efe1f21a5867b24531c988d9f423
4
+ data.tar.gz: ef2849d3bd39335bd3e1b19a10b61ca1c613230570db7b7a7792d0154d39943d
5
5
  SHA512:
6
- metadata.gz: 1bcda4beaed9ffdd7f9d2e254da451dade55bed7861e6691029d987e0df6e4d469e74091649dbdb3aab77dfb05885c965f03131d7e26174148ecb03ef23aeaf9
7
- data.tar.gz: 2530fcf8cfcf4b7a5bff064097f16da2de02fc0db0ea32ba7c7270424b3adfa42854c7d4e561acd137aa79ef4fa0961e702cc67b71f51dc857891ff52758ee78
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
@@ -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"
@@ -1,3 +1,3 @@
1
1
  module Hsss
2
- VERSION = "0.1.19"
2
+ VERSION = "0.1.20"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hsss
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.19
4
+ version: 0.1.20
5
5
  platform: ruby
6
6
  authors:
7
7
  - Leo P.