Method CompilerEnvironment()->PikeCompiler()->push_type_attribute()


Method push_type_attribute

bool|type push_type_attribute(string attribute, type a, type b, mapping|void state)

Description

Type attribute handler.

Called during type checking when a <= b and b had the type attribute attribute before the comparison.

The default implementation implements the "deprecated" attribute.

Returns

Returns one of:

type

An alternative type for b against which a will be matched again.

int(1)

Allow the check (ie a <= __attribute__(attribute, b)).

int(0)

Do not allow the check.

See also

pop_type_attribute(), index_type_attribute()