ruby/enc/encinit.c.erb

27 строки
593 B
Plaintext

/* 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));
void
Init_enc(void)
{
% ENCS.each do |enc|
init(Init_<%= enc %>, "enc/<%= enc %>.so");
% end
init(Init_transdb, "enc/trans/transdb.so");
% TRANS.each do |trans|
% next if trans == 'trans/transdb'
init(Init_trans_<%= File.basename trans %>, "enc/<%= trans %>.so");
% end
}
<%# vim: set ft=eruby sw=2 : -%>