Skip to content

Commit cd608b6

Browse files
author
Y_Less
committed
Proper function deprecation.
1 parent a59752b commit cd608b6

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

include/crashdetect.inc

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,25 @@
2727
#endif
2828
#define CRASHDETECT_INC
2929

30-
// Backwards compatibility; will be removed in the future.
31-
#define PrintAmxBacktrace PrintBacktrace
32-
#define GetAmxBacktrace GetBacktrace
33-
3430
native PrintBacktrace();
3531
native PrintNativeBacktrace();
3632

3733
native GetBacktrace(string[], size = sizeof(string));
3834
native GetNativeBacktrace(string[], size = sizeof(string));
3935

36+
// Backwards compatibility; will be removed in the future.
37+
#pragma deprecated Use `PrintBacktrace`
38+
stock PrintAmxBacktrace()
39+
{
40+
return PrintBacktrace();
41+
}
42+
43+
#pragma deprecated Use `GetBacktrace`
44+
stock GetAmxBacktrace(string[], size = sizeof(string))
45+
{
46+
return GetBacktrace(string, size);
47+
}
48+
4049
forward OnRuntimeError(code, &bool:suppress);
4150

4251
stock bool:IsCrashDetectPresent() {

0 commit comments

Comments
 (0)