'Tacks a type modifier on a declarator, and returns
the modified declarator.
Note: the declarator and modifier may be modified'

def _type_modify_decl(self, decl, modifier):

    modifier_head = modifier
    modifier_tail = modifier
    while modifier_tail.type:
        modifier_tail = modifier_tail.type
    if isinstance(decl, c_ast.TypeDecl):
        modifier_tail.type = decl
        return modifier
    else:
        decl_tail = decl
        while (not isinstance(decl_tail.type, c_ast.TypeDecl)):
            decl_tail = decl_tail.type
        modifier_tail.type = decl_tail.type
        decl_tail.type = modifier_head
        return decl
