def call_misc (function, list_pointer)

      list_pointer = list_pointer.pointer \
        if list_pointer.is_a?(Rufus::Tokyo::List)

      begin
        l = do_call_misc(function, list_pointer)
        raise "function '#{function}' failed" unless l
        Rufus::Tokyo::List.new(l).release
      ensure
        Rufus::Tokyo::List.free(list_pointer)
      end
    end
def call_misc (function, list_pointer)

      list_pointer = list_pointer.pointer \
        if list_pointer.is_a?(Rufus::Tokyo::List)

      begin
        l = do_call_misc(function, list_pointer)
        raise "function '#{function}' failed" unless l
        Rufus::Tokyo::List.new(l).release
      ensure
        Rufus::Tokyo::List.free(list_pointer)
      end
    end
--
def check_transaction_support
  raise(TokyoError.new(
    "The version of Tokyo Cabinet you're using doesn't support " +
    "transactions for non-table structures. Upgrade to TC >= 1.4.13.")
  ) unless lib.respond_to?(:tcadbtranbegin)
end
++
 Wrapping tcadbmisc or tcrdbmisc
 (and taking care of freeing the list_pointer)