• Xavier Thompson's avatar
    Introduce the 'consume' keyword · 80ab2867
    Xavier Thompson authored
    This is different from 'recover' (which was previously named 'consume'):
    
    ```
      (1)	consume <name | attr> [ with <expr> ]
    ```
    
    - The operand can either be a *name* an *attribute*.
    
    - if the operand is a cypclass or a pointer the value NULL
      is assigned to it; else the operand keeps its old value.
    
    - The resulting value of 'consume' is the old value of the operand.
    
    - The resulting type is the type of the operand seen as an rvalue,
      i.e. the same type except for 'iso' which is seen as 'iso~'.
    80ab2867
cypclass_consume_refcount.pyx 2.35 KB