pike.git/
src/
stralloc.c
Branch:
Tag:
Non-build tags
All tags
No tags
2011-07-21
2011-07-21 15:30:02 by Henrik Grubbström (Grubba) <grubba@grubba.org>
dc245f2a53bc734abb03b35518beb15d282881e3 (
7
lines) (+
5
/-
2
)
[
Show
|
Annotate
]
Branch:
7.9
Improved DMALLOC tracing of strings in the wide and short string cases.
533:
#undef INIT_BLOCK #define INIT_BLOCK(NEW_STR) do { \
-
(NEW_STR)->refs =
1
; \
+
(NEW_STR)->refs =
0
; \
+
add_ref((NEW_STR)); \
(NEW_STR)->flags = \ STRING_NOT_HASHED|STRING_NOT_SHARED|STRING_IS_SHORT; \ } while(0)
723:
sizeof(struct pike_string_hdr)); t->flags = STRING_NOT_HASHED|STRING_NOT_SHARED; }
-
t->refs =
1
;
+
t->refs =
0
;
+
add_ref(t); /* For DMALLOC */
t->len=len; t->size_shift=shift; DO_IF_DEBUG(t->next = NULL);