sax :: AttributesImpl :: attributes=
It may be more efficient to reuse an existing object rather than constantly allocating new ones.
Parameters:
atts
: attributes to copy.
# Copy an entire Attributes object.
#
# It may be more efficient to reuse an existing object
# rather than constantly allocating new ones.
#
# Parameters:
#
# * `atts`: attributes to copy.
fun attributes=(atts: Attributes) do
var i = 0
clear
length = atts.length
data.enlarge(length * 5)
while i < length do
data.push(atts.uri(i).as(not null))
data.push(atts.local_name(i).as(not null))
data.push(atts.qname(i).as(not null))
data.push(atts.type_of(i).as(not null))
data.push(atts.value_of(i).as(not null))
i += 1
end
end
lib/sax/helpers/attributes_impl.nit:275,2--297,4