Changeset 1558 in svn for trunk/util/xc_vector.h


Ignore:
Timestamp:
2014-11-10T06:08:07Z (5 years ago)
Author:
Xuefer
Message:

closes #342: object caching

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/util/xc_vector.h

    r1551 r1558  
    3939static inline void xc_vector_destroy_impl(xc_vector_t *vector TSRMLS_DC)
    4040{
     41    vector->size = 0;
    4142    if (vector->data) {
    4243        pefree(vector->data, vector->persistent);
     44        vector->data = NULL;
    4345    }
    4446    vector->capacity = 0;
    45     vector->size = 0;
     47    vector->data_size = 0;
    4648}
    4749
     
    4951
    5052#define xc_vector_size(vector) ((vector)->size)
     53#define xc_vector_initialized(vector) ((vector)->data_size != 0)
    5154#define xc_vector_element_ptr_(vector, index) ( \
    5255    (void *) ( \
Note: See TracChangeset for help on using the changeset viewer.