Method CompilerEnvironment()->PikeCompiler()->apply_type_attribute()


Method apply_type_attribute

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

Description

Type attribute handler.

Parameter attribute

Attribute that a had.

Parameter a

Continuation of the function being called or UNDEFINED indicating that there are no further arguments.

Parameter state

Mapping intended to hold state during checking of multiple arguments.

Called during type checking when there has been successfull partial evaluation of a function type that had the type attribute attribute before the evaluation.

The default implementation implements the attributes:

__deprecated__

Returns

Returns 1 if the type check should be allowed (ie __attribute__(attribute, a)(b)) is valid, and 0 (zero) otherwise.

See also

pop_type_attribute(), push_type_attribute()