summaryrefslogtreecommitdiff
path: root/ext/socket/mkconstants.rb
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-01-01 07:09:19 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-01-01 07:09:19 +0000
commit89cf0ec1a611494f15076d590fd6af214d4ff5ad (patch)
tree63027b9caa79a49c7a1b003006d53b6a8f986cf2 /ext/socket/mkconstants.rb
parent2b3e480bef31e3a1cb30e37ec92e5a59f8b0aa7a (diff)
* ext/socket/mkconstants.rb: generate init_constants function.
* ext/socket/socket.c (Init_socket): call init_constants. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21238 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/socket/mkconstants.rb')
-rw-r--r--ext/socket/mkconstants.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/socket/mkconstants.rb b/ext/socket/mkconstants.rb
index 02d7e17..257b315 100644
--- a/ext/socket/mkconstants.rb
+++ b/ext/socket/mkconstants.rb
@@ -53,6 +53,9 @@ def each_data
end
result << ERB.new(<<'EOS', nil, '%').result(binding)
+static void
+init_constants(VALUE mConst)
+{
% each_data {|guard, define, name, default_value|
% if guard
#if <%=guard%>
@@ -69,6 +72,7 @@ result << ERB.new(<<'EOS', nil, '%').result(binding)
% end
% }
+}
EOS
if opt_o