Daniele Bartolini 10 ani în urmă
părinte
comite
ccc062143f

+ 1 - 1
src/core/error.cpp

@@ -21,7 +21,7 @@ namespace error
 		va_end(ap);
 		printf("\tIn: %s:%d\n", file, line);
 		printf("Stacktrace:\n");
-		stacktrace();
+		print_callstack();
 		exit(EXIT_FAILURE);
 	}
 } // namespace error

+ 2 - 1
src/core/stacktrace.h

@@ -8,6 +8,7 @@
 namespace crown
 {
 
-void stacktrace();
+/// Prints the current call stack.
+void print_callstack();
 
 } // namespace crown

+ 1 - 1
src/core/stacktrace_android.cpp

@@ -10,7 +10,7 @@
 namespace crown
 {
 
-void stacktrace()
+void print_callstack()
 {
 }
 

+ 1 - 1
src/core/stacktrace_linux.cpp

@@ -15,7 +15,7 @@
 namespace crown
 {
 
-void stacktrace()
+void print_callstack()
 {
 	void* array[50];
 	int size = backtrace(array, 50);

+ 1 - 1
src/core/stacktrace_windows.cpp

@@ -14,7 +14,7 @@
 namespace crown
 {
 
-void stacktrace()
+void print_callstack()
 {
 	SymInitialize(GetCurrentProcess(), NULL, TRUE);
 	SymSetOptions(SYMOPT_LOAD_LINES | SYMOPT_UNDNAME);