mirror of
https://github.com/love2d/love.git
synced 2026-08-16 16:20:42 +02:00
Expose love.markDeprecated.
Arguments are (level, name, apitype, deprecationtype [, replacementname]). Call it inside a function.
This commit is contained in:
@@ -108,6 +108,8 @@ std::string getDeprecationNotice(const DeprecationInfo &info, bool usewhere)
|
||||
notice += "function ";
|
||||
else if (info.apiType == API_METHOD)
|
||||
notice += "method ";
|
||||
else if (info.apiType == API_CALLBACK)
|
||||
notice += "callback ";
|
||||
else if (info.apiType == API_FIELD)
|
||||
notice += "field ";
|
||||
else if (info.apiType == API_CONSTANT)
|
||||
@@ -184,4 +186,22 @@ MarkDeprecated::~MarkDeprecated()
|
||||
mutex->unlock();
|
||||
}
|
||||
|
||||
STRINGMAP_BEGIN(APIType, API_MAX_ENUM, apiType)
|
||||
{
|
||||
{ "function", API_FUNCTION },
|
||||
{ "method", API_METHOD },
|
||||
{ "callback", API_CALLBACK },
|
||||
{ "field", API_FIELD },
|
||||
{ "constant", API_CONSTANT },
|
||||
}
|
||||
STRINGMAP_END(APIType, API_MAX_ENUM, apiType)
|
||||
|
||||
STRINGMAP_BEGIN(DeprecationType, DEPRECATED_MAX_ENUM, deprecationType)
|
||||
{
|
||||
{ "noreplacement", DEPRECATED_NO_REPLACEMENT },
|
||||
{ "replaced", DEPRECATED_REPLACED },
|
||||
{ "renamed", DEPRECATED_RENAMED },
|
||||
}
|
||||
STRINGMAP_END(DeprecationType, DEPRECATED_MAX_ENUM, deprecationType)
|
||||
|
||||
} // love
|
||||
|
||||
Reference in New Issue
Block a user