2012-05-16 09:39:06 +04:00
|
|
|
/* Copyright 2012 Google Inc. Some Rights Reserved.
|
|
|
|
* Author: yugui@google.com (Yugui Sonoda)
|
|
|
|
*/
|
|
|
|
#include <stdio.h>
|
|
|
|
|
|
|
|
#define init(func, name) { \
|
|
|
|
extern void func(void); \
|
|
|
|
ruby_init_ext(name, func); \
|
|
|
|
}
|
|
|
|
|
|
|
|
void ruby_init_ext(const char *name, void (*init)(void));
|
|
|
|
|
2012-05-19 07:44:04 +04:00
|
|
|
void
|
|
|
|
Init_enc(void)
|
2012-05-16 09:39:06 +04:00
|
|
|
{
|
2012-05-17 05:39:39 +04:00
|
|
|
% ENCS.each do |enc|
|
2012-05-16 09:39:06 +04:00
|
|
|
init(Init_<%= enc %>, "enc/<%= enc %>.so");
|
2012-05-17 05:39:39 +04:00
|
|
|
% end
|
2012-05-16 09:39:06 +04:00
|
|
|
|
2012-05-17 05:39:39 +04:00
|
|
|
init(Init_transdb, "enc/trans/transdb.so");
|
|
|
|
% TRANS.each do |trans|
|
|
|
|
% next if trans == 'trans/transdb'
|
2012-05-16 09:39:06 +04:00
|
|
|
init(Init_trans_<%= File.basename trans %>, "enc/<%= trans %>.so");
|
2012-05-17 05:39:39 +04:00
|
|
|
% end
|
2012-05-16 09:39:06 +04:00
|
|
|
}
|
2012-05-17 05:39:39 +04:00
|
|
|
<%# vim: set ft=eruby sw=2 : -%>
|