summaryrefslogtreecommitdiff
path: root/template/builtin_binary.inc.tmpl
diff options
context:
space:
mode:
Diffstat (limited to 'template/builtin_binary.inc.tmpl')
-rw-r--r--template/builtin_binary.inc.tmpl10
1 files changed, 5 insertions, 5 deletions
diff --git a/template/builtin_binary.inc.tmpl b/template/builtin_binary.inc.tmpl
index 787ced5f3d..2c2f071705 100644
--- a/template/builtin_binary.inc.tmpl
+++ b/template/builtin_binary.inc.tmpl
@@ -10,19 +10,19 @@ static const unsigned char <%= feature %>_bin[] = {
% iseq \
% . to_binary \
% . each_byte \
-% . map(&:ord) \
-% . map{ '0x%02x' % _1 } \
% . each_slice(12) {|a|
- <%= a.join(', ') %>,
+ <%= a.map{ '0x%02x,' % _1 }.join(' ') %>
% }
};
% }
+#define BUILTIN_BIN(feature) \
+ { #feature, feature ## _bin, sizeof(feature ## _bin), }
static const struct builtin_binary builtin_binary[] = {
% ary.each{|feature, |
- { <%= feature.dump %>, <%= feature %>_bin, sizeof(<%= feature %>_bin), },
+ BUILTIN_BIN(<%= feature %>),
% }
- { NULL, },<%# dummy entry %>
+ { NULL, },/* sentinel */
};
#define BUILTIN_BINARY_SIZE <%= ary.size %>