Method CompilerEnvironment()->PikeCompiler()->index_type_attribute()


Method index_type_attribute

bool index_type_attribute(string attribute, type a, type i)

Description

Type attribute handler.

Called during type checking when a value of the type a is indexed with a value of type i and a had the type attribute attribute before the comparison.

The default implementation implements the "deprecated" attribute.

Returns

Returns 1 if the type check should be allowed (ie __attribute__(attribute, a)[i]), and 0 (zero) otherwise.

See also

pop_type_attribute(), push_type_attribute()