X-Git-Url: https://feistymeow.org/gitweb/?a=blobdiff_plain;f=nucleus%2Flibrary%2Fapplication%2Fcallstack_tracker.cpp;h=4194bbee9369a77b6a9336819b177638446d0c1a;hb=d7e8a05960951d8ce67e36c587726a851e2f5165;hp=c9f43babbe585dbfa8cc992bf69c5be4bed3ca73;hpb=fa30e6adff1dea5d6b3903279ef024dd3bed043f;p=feisty_meow.git diff --git a/nucleus/library/application/callstack_tracker.cpp b/nucleus/library/application/callstack_tracker.cpp index c9f43bab..4194bbee 100644 --- a/nucleus/library/application/callstack_tracker.cpp +++ b/nucleus/library/application/callstack_tracker.cpp @@ -200,9 +200,9 @@ int callstack_tracker::full_trace_size() const frame_tracking_instance::frame_tracking_instance(const char *class_name, const char *func, const char *file, int line, bool add_frame) : _frame_involved(add_frame), - _class(class_name? strdup(class_name) : NIL), - _func(func? strdup(func) : NIL), - _file(file? strdup(file) : NIL), + _class(class_name? strdup(class_name) : NULL_POINTER), + _func(func? strdup(func) : NULL_POINTER), + _file(file? strdup(file) : NULL_POINTER), _line(line) { if (_frame_involved) { @@ -215,9 +215,9 @@ frame_tracking_instance::frame_tracking_instance(const char *class_name, frame_tracking_instance::frame_tracking_instance (const frame_tracking_instance &to_copy) : _frame_involved(false), // copies don't get a right to this. - _class(to_copy._class? strdup(to_copy._class) : NIL), - _func(to_copy._func? strdup(to_copy._func) : NIL), - _file(to_copy._file? strdup(to_copy._file) : NIL), + _class(to_copy._class? strdup(to_copy._class) : NULL_POINTER), + _func(to_copy._func? strdup(to_copy._func) : NULL_POINTER), + _file(to_copy._file? strdup(to_copy._file) : NULL_POINTER), _line(to_copy._line) { } @@ -231,9 +231,9 @@ void frame_tracking_instance::clean() program_wide_stack_trace().pop_frame(); } _frame_involved = false; - free(_class); _class = NIL; - free(_func); _func = NIL; - free(_file); _file = NIL; + free(_class); _class = NULL_POINTER; + free(_func); _func = NULL_POINTER; + free(_file); _file = NULL_POINTER; _line = 0; } @@ -252,9 +252,9 @@ void frame_tracking_instance::assign(const char *class_name, const char *func, { clean(); _frame_involved = false; // copies don't get a right to this. - _class = class_name? strdup(class_name) : NIL; - _func = func? strdup(func) : NIL; - _file = file? strdup(file) : NIL; + _class = class_name? strdup(class_name) : NULL_POINTER; + _func = func? strdup(func) : NULL_POINTER; + _file = file? strdup(file) : NULL_POINTER; _line = line; }