Keeps a hash of strings against their corresponding offsets within the qt_meta_stringdata sequence of null terminated strings. Returns a proc to get an offset given a string. That proc also adds new strings to the ‘data’ array, and updates the corresponding ‘pack_str’ Array#pack template.
Source Code
# File qt/qtruby4.rb, line 2421 def Internal.string_table_handler(data, pack_str) hsh = {} offset = 0 return lambda do |str| if !hsh.has_key? str hsh[str] = offset data << str pack_str << "a*x" offset += str.length + 1 end return hsh[str] end end
<code/>and<pre/>for code samples.