Print function name and file location when caught a SIGSEGV
This commit is contained in:
4
da.h
4
da.h
@@ -7,11 +7,11 @@
|
||||
do { \
|
||||
if ((da)->count == 0) { \
|
||||
(da)->capacity = 1; \
|
||||
(da)->items = malloc(sizeof(item)*sizeof((da)->capacity)); \
|
||||
(da)->items = (typeof((da)->items))malloc(sizeof(item)*sizeof((da)->capacity)); \
|
||||
} else { \
|
||||
if ((da)->count == (da)->capacity) { \
|
||||
(da)->capacity *= 2; \
|
||||
(da)->items = realloc((da)->items, (da)->capacity * sizeof((item))); \
|
||||
(da)->items = (typeof((da)->items))realloc((da)->items, (da)->capacity * sizeof((item))); \
|
||||
} \
|
||||
} \
|
||||
(da)->items[(da)->count++] = (item); \
|
||||
|
||||
Reference in New Issue
Block a user