Lines Matching refs:var_hash
44 var_entries *var_hash = (*var_hashx)->last; in var_push() local
46 fprintf(stderr, "var_push(%ld): %d\n", var_hash?var_hash->used_slots:-1L, Z_TYPE_PP(rval)); in var_push()
49 if (!var_hash || var_hash->used_slots == VAR_ENTRIES_MAX) { in var_push()
50 var_hash = emalloc(sizeof(var_entries)); in var_push()
51 var_hash->used_slots = 0; in var_push()
52 var_hash->next = 0; in var_push()
55 (*var_hashx)->first = var_hash; in var_push()
57 ((var_entries *) (*var_hashx)->last)->next = var_hash; in var_push()
60 (*var_hashx)->last = var_hash; in var_push()
63 var_hash->data[var_hash->used_slots++] = *rval; in var_push()
68 var_entries *var_hash; in get_var_push_dtor_slot() local
74 var_hash = (*var_hashx)->last_dtor; in get_var_push_dtor_slot()
76 …fprintf(stderr, "var_push_dtor(%p, %ld): %d\n", *rval, var_hash?var_hash->used_slots:-1L, Z_TYPE_P… in get_var_push_dtor_slot()
79 if (!var_hash || var_hash->used_slots == VAR_ENTRIES_MAX) { in get_var_push_dtor_slot()
80 var_hash = emalloc(sizeof(var_entries)); in get_var_push_dtor_slot()
81 var_hash->used_slots = 0; in get_var_push_dtor_slot()
82 var_hash->next = 0; in get_var_push_dtor_slot()
85 (*var_hashx)->first_dtor = var_hash; in get_var_push_dtor_slot()
87 ((var_entries *) (*var_hashx)->last_dtor)->next = var_hash; in get_var_push_dtor_slot()
90 (*var_hashx)->last_dtor = var_hash; in get_var_push_dtor_slot()
93 return &var_hash->data[var_hash->used_slots++]; in get_var_push_dtor_slot()
105 var_entries *var_hash; in var_push_dtor_no_addref() local
111 var_hash = (*var_hashx)->last_dtor; in var_push_dtor_no_addref()
113 …fprintf(stderr, "var_push_dtor_no_addref(%p, %ld): %d (%d)\n", *rval, var_hash?var_hash->used_slot… in var_push_dtor_no_addref()
116 if (!var_hash || var_hash->used_slots == VAR_ENTRIES_MAX) { in var_push_dtor_no_addref()
117 var_hash = emalloc(sizeof(var_entries)); in var_push_dtor_no_addref()
118 var_hash->used_slots = 0; in var_push_dtor_no_addref()
119 var_hash->next = 0; in var_push_dtor_no_addref()
122 (*var_hashx)->first_dtor = var_hash; in var_push_dtor_no_addref()
124 ((var_entries *) (*var_hashx)->last_dtor)->next = var_hash; in var_push_dtor_no_addref()
127 (*var_hashx)->last_dtor = var_hash; in var_push_dtor_no_addref()
130 var_hash->data[var_hash->used_slots++] = *rval; in var_push_dtor_no_addref()
136 var_entries *var_hash = (*var_hashx)->first; in var_replace() local
138 fprintf(stderr, "var_replace(%ld): %d\n", var_hash?var_hash->used_slots:-1L, Z_TYPE_PP(nzval)); in var_replace()
141 while (var_hash) { in var_replace()
142 for (i = 0; i < var_hash->used_slots; i++) { in var_replace()
143 if (var_hash->data[i] == ozval) { in var_replace()
144 var_hash->data[i] = *nzval; in var_replace()
148 var_hash = var_hash->next; in var_replace()
154 var_entries *var_hash = (*var_hashx)->first; in var_access() local
156 fprintf(stderr, "var_access(%ld): %ld\n", var_hash?var_hash->used_slots:-1L, id); in var_access()
159 while (id >= VAR_ENTRIES_MAX && var_hash && var_hash->used_slots == VAR_ENTRIES_MAX) { in var_access()
160 var_hash = var_hash->next; in var_access()
164 if (!var_hash) return !SUCCESS; in var_access()
166 if (id < 0 || id >= var_hash->used_slots) return !SUCCESS; in var_access()
168 *store = &var_hash->data[id]; in var_access()
177 var_entries *var_hash = (*var_hashx)->first; in var_destroy() local
182 fprintf(stderr, "var_destroy(%ld)\n", var_hash?var_hash->used_slots:-1L); in var_destroy()
185 while (var_hash) { in var_destroy()
186 next = var_hash->next; in var_destroy()
187 efree(var_hash); in var_destroy()
188 var_hash = next; in var_destroy()
191 var_hash = (*var_hashx)->first_dtor; in var_destroy()
193 while (var_hash) { in var_destroy()
194 for (i = 0; i < var_hash->used_slots; i++) { in var_destroy()
195 zval *zv = var_hash->data[i]; in var_destroy()
197 …fprintf(stderr, "var_destroy dtor(%p, %ld)\n", var_hash->data[i], Z_REFCOUNT_P(var_hash->data[i])); in var_destroy()
225 next = var_hash->next; in var_destroy()
226 efree(var_hash); in var_destroy()
227 var_hash = next; in var_destroy()
343 …rval, const unsigned char **p, const unsigned char *max, php_unserialize_data_t *var_hash TSRMLS_DC
344 #define UNSERIALIZE_PASSTHRU rval, p, max, var_hash TSRMLS_CC
354 var_push_dtor_no_addref(var_hash, &key); in process_nested_data()
359 var_push_dtor_no_addref(var_hash, &key); in process_nested_data()
365 if (!php_var_unserialize(&data, p, max, var_hash TSRMLS_CC)) { in process_nested_data()
366 var_push_dtor_no_addref(var_hash, &key); in process_nested_data()
367 var_push_dtor_no_addref(var_hash, &data); in process_nested_data()
375 var_push_dtor(var_hash, old_data); in process_nested_data()
381 var_push_dtor(var_hash, old_data); in process_nested_data()
390 var_push_dtor(var_hash, old_data); in process_nested_data()
395 var_push_dtor(var_hash, &data); in process_nested_data()
396 var_push_dtor_no_addref(var_hash, &key); in process_nested_data()
433 …e(rval, ce, (const unsigned char*)*p, datalen, (zend_unserialize_data *)var_hash TSRMLS_CC) != SUC… in object_custom()
494 zval **slot = get_var_push_dtor_slot(var_hash); in object_common2()
522 if (var_hash && cursor[0] != 'R') { in php_var_unserialize()
523 var_push(var_hash, rval); in php_var_unserialize()
688 if (!var_hash) return 0; in php_var_unserialize()
854 if (!var_hash) return 0; in php_var_unserialize()
890 if (!var_hash) return 0; in php_var_unserialize()
1295 if (!var_hash) return 0; in php_var_unserialize()
1298 if (id == -1 || var_access(var_hash, id, &rval_ref) != SUCCESS) { in php_var_unserialize()
1305 var_push_dtor_no_addref(var_hash, rval); in php_var_unserialize()
1341 if (!var_hash) return 0; in php_var_unserialize()
1344 if (id == -1 || var_access(var_hash, id, &rval_ref) != SUCCESS) { in php_var_unserialize()
1349 var_push_dtor_no_addref(var_hash, rval); in php_var_unserialize()