mirror of
https://github.com/love2d/love.git
synced 2026-08-16 16:20:42 +02:00
Add the ability to have formally deprecated functions.
Functions which are deprecated will print out a message and show up in a small dialog on-screen, when they're first called. Deprecation output is disabled in fused mode by default, and can be modified with love.setDeprecationOutput(enable). --HG-- branch : minor
This commit is contained in:
@@ -23,6 +23,7 @@
|
||||
|
||||
// LOVE
|
||||
#include "types.h"
|
||||
#include "deprecation.h"
|
||||
|
||||
// Lua
|
||||
extern "C" {
|
||||
@@ -447,6 +448,13 @@ lua_State *luax_insistpinnedthread(lua_State *L);
|
||||
**/
|
||||
lua_State *luax_getpinnedthread(lua_State *L);
|
||||
|
||||
/**
|
||||
* Mark a function as deprecated. Should only be called inside wrapper function
|
||||
* code.
|
||||
**/
|
||||
void luax_markdeprecated(lua_State *L, const char *name);
|
||||
void luax_markdeprecated(lua_State *L, const char *name, DeprecationType type, const char *replacement);
|
||||
|
||||
extern "C" { // Also called from luasocket
|
||||
int luax_typerror(lua_State *L, int narg, const char *tname);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user