Use offsetof macro and shrink table size
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56952 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
4f7c3d3583
commit
671c929f0a
File diff suppressed because it is too large
Load Diff
@ -381,7 +381,6 @@ output = Unifdef.new($stdout)
|
|||||||
output.kwdonly = !header
|
output.kwdonly = !header
|
||||||
|
|
||||||
puts '%{'
|
puts '%{'
|
||||||
puts '#define long size_t'
|
|
||||||
props, data = parse_unicode_data(get_file('UnicodeData.txt'))
|
props, data = parse_unicode_data(get_file('UnicodeData.txt'))
|
||||||
categories = {}
|
categories = {}
|
||||||
props.concat parse_scripts(data, categories)
|
props.concat parse_scripts(data, categories)
|
||||||
@ -423,7 +422,8 @@ output.endif :USE_UNICODE_PROPERTIES
|
|||||||
puts(<<'__HEREDOC')
|
puts(<<'__HEREDOC')
|
||||||
};
|
};
|
||||||
struct uniname2ctype_struct {
|
struct uniname2ctype_struct {
|
||||||
int name, ctype;
|
short name;
|
||||||
|
unsigned short ctype;
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct uniname2ctype_struct *uniname2ctype_p(const char *, unsigned int);
|
static const struct uniname2ctype_struct *uniname2ctype_p(const char *, unsigned int);
|
||||||
@ -512,6 +512,12 @@ if header
|
|||||||
end while syms.pop
|
end while syms.pop
|
||||||
fds.each(&:close)
|
fds.each(&:close)
|
||||||
IO.popen(%W[diff -DUSE_UNICODE_AGE_PROPERTIES #{fds[1].path} #{fds[0].path}], "r") {|age|
|
IO.popen(%W[diff -DUSE_UNICODE_AGE_PROPERTIES #{fds[1].path} #{fds[0].path}], "r") {|age|
|
||||||
system(* %W[diff -DUSE_UNICODE_PROPERTIES #{fds[2].path} -], in: age)
|
IO.popen(%W[diff -DUSE_UNICODE_PROPERTIES #{fds[2].path} -], "r", in: age) {|f|
|
||||||
|
f.each {|line|
|
||||||
|
line.gsub!(/\(int\)\(long\)&\(\((struct uniname2ctype_pool_t) \*\)0\)->(uniname2ctype_pool_str\d+),\s+/,
|
||||||
|
'offsetof(\1, \2), ')
|
||||||
|
puts line
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user