    # File lib/ffi/library.rb, line 221
        def typedef(old, add, info=nil)
          @ffi_typedefs = Hash.new unless defined?(@ffi_typedefs)

          @ffi_typedefs[add] = if old.kind_of?(FFI::Type)
            old

          elsif @ffi_typedefs.has_key?(old)
            @ffi_typedefs[old]

          elsif old.is_a?(DataConverter)
            FFI::Type::Mapped.new(old)

          elsif old == :enum
            if add.kind_of?(Array)
              self.enum(add)
            else
              self.enum(info, add)
            end

          else
            FFI.find_type(old)
          end
        end