Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add proper Lua API deprecated handling #1261

Merged
merged 1 commit into from
Apr 29, 2014

Conversation

sapier
Copy link
Contributor

@sapier sapier commented Apr 29, 2014

As various discussions about broken lua api revealed we've got need for proper handling of old and sometimes broken lua api calls.

In order to get rid about them we need a way to give mod authors chance to replace them prior removal.
This patch adds (configurable) logging of deprecated functions mod authors are suggested to set
"deprecated_lua_api_handling" to error in order to replace those calls as soon as possible.

Server owners running >>>release build<<< don't need to do anything as legacy handling is done there.

Everyone running >>>debug build<<< will see log messages about deprecated functions, unless having manually set "deprecated_lua_api_handling" to "legacy"

if (doerror) {
verbosestream << message << std::endl;

if (L != 0) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use NULL when comparing pointers.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry forgot about minetest being NULL-land

@ShadowNinja ShadowNinja changed the title Add proper lua api deprecated handling Add proper Lua API deprecated handling Apr 29, 2014
@sapier sapier merged commit b5acec0 into minetest:master Apr 29, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants