def store(key, value, mode = nil, &dup_handler)
      if mode == :add and dup_handler.nil?
        super
      elsif dup_handler
        warn "block supersedes mode argument" unless mode.nil?
        k        = cast_key_in(key)
        callback = lambda { |old_value_pointer, old_size, returned_size, _|
          old_value         = cast_from_null_terminated_colums(
                                *old_value_pointer.get_bytes(0, old_size)
                              )
          replacement, size = cast_to_null_terminated_colums( yield( key,
                                                                     old_value,
                                                                     value ) )
          returned_size.put_int(0, size)
          pointer = Utilities.malloc(size)
          pointer.put_bytes(0, replacement) unless pointer.address.zero?
          pointer
        }
        try(:putproc, k, cast_to_null_terminated_colums(value), callback, nil)
        value
      else
        Utilities.temp_map do |map|
          map.update(value) { |string|
            cast_to_bytes_and_length(string)
          }
          result = super(key, map, mode, &dup_handler)
          result == map ? value : result
        end
      end
    end
def store(key, value, mode = nil, &dup_handler)
      if mode == :add and dup_handler.nil?
        super
      elsif dup_handler
        warn "block supersedes mode argument" unless mode.nil?
        k        = cast_key_in(key)
        callback = lambda { |old_value_pointer, old_size, returned_size, _|
          old_value         = cast_from_null_terminated_colums(
                                *old_value_pointer.get_bytes(0, old_size)
                              )
          replacement, size = cast_to_null_terminated_colums( yield( key,
                                                                     old_value,
                                                                     value ) )
          returned_size.put_int(0, size)
          pointer = Utilities.malloc(size)
          pointer.put_bytes(0, replacement) unless pointer.address.zero?
          pointer
        }
        try(:putproc, k, cast_to_null_terminated_colums(value), callback, nil)
        value
      else
        Utilities.temp_map do |map|
          map.update(value) { |string|
            cast_to_bytes_and_length(string)
          }
          result = super(key, map, mode, &dup_handler)
          result == map ? value : result
        end
      end
    end
Getting and Setting Keys