ext/extconf.rb in google_hash-0.3.1 vs ext/extconf.rb in google_hash-0.4.0

- old
+ new

@@ -1,12 +1,12 @@ require 'mkmf' require 'erb' require 'rubygems' require 'sane' -puts 'got', xsystem("ls") -# build google's lib locally... +# re-build google's lib locally... + dir = Dir.pwd Dir.chdir 'sparsehash-1.5.2' do dir = dir + '/local_installed' command = "sh configure --prefix=#{dir} && make && make install" puts command @@ -33,32 +33,27 @@ else unreachable_int = 63 end ruby_key = {:convert_keys_from_ruby => "", :convert_keys_to_ruby => "", :key_type => "VALUE", :unreachable_key => "current_instance"} # TODO NULL is false here? -long_key = {:assert_key_type => 'T_FIXNUM', :convert_keys_from_ruby => "FIX2LONG", -:convert_keys_to_ruby => "LONG2FIX", :key_type => "long", :unreachable_key => "1<<#{unreachable_int}"} +#long is not useful to us since we don't support BigNum yet +# i.e. long is basically broken till we do +#long_key = {:assert_key_type => 'T_FIXNUM', :convert_keys_from_ruby => "FIX2LONG", +#:convert_keys_to_ruby => "LONG2FIX", :key_type => "long", :unreachable_key => "1<<#{unreachable_int}"} int_key = {:assert_key_type => 'T_FIXNUM', :convert_keys_from_ruby => "FIX2INT", :convert_keys_to_ruby => "INT2FIX", :key_type => "int", :unreachable_key => "1<<#{unreachable_int}"} ruby_value = {:value_type => "VALUE"} -long_value = {:assert_value_type => 'T_FIXNUM', :convert_values_from_ruby => "FIX2LONG", -:convert_values_to_ruby => "LONG2FIX", :value_type => "long"} +#long_value = {:assert_value_type => 'T_FIXNUM', :convert_values_from_ruby => "FIX2LONG", +#:convert_values_to_ruby => "LONG2FIX", :value_type => "long"} int_value = {:assert_value_type => 'T_FIXNUM', :convert_values_from_ruby => "FIX2INT", :convert_values_to_ruby => "INT2FIX", :value_type => "int"} - -long_to_ruby = long_key.merge(ruby_value) -ruby_to_ruby = ruby_key.merge(ruby_value) - -long_to_long = long_key.merge(long_value) - init_funcs = [] -require 'sane' -for key in [ruby_key, long_key, int_key] do - for value in [ruby_value, long_value, int_value] do +for key in [ruby_key, int_key] do + for value in [ruby_value, int_value] do options = key.merge(value) for type in ['sparse', 'dense'] do # create local variables so that the template can look cleaner