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

fix use of arg in ltn12 #24

Merged
merged 1 commit into from Dec 10, 2012
Merged

fix use of arg in ltn12 #24

merged 1 commit into from Dec 10, 2012

Conversation

catwell
Copy link
Member

@catwell catwell commented Sep 17, 2012

arg is not part of Lua 5.1 and hence no longer works in Lua 5.2 or LuaJIT with its default compilation options.

Note that arg is apparently used in other parts of the codebase, but I have only hit this issue in ltn12 so far. If you think this fix is correct I can git a try at hunting use of arg in other places.

@diegonehab
Copy link
Contributor

The alternative would be to use the select function, which may be more efficient. On the other hand, these functions are not performance critical, so I am merging the request.

diegonehab added a commit that referenced this pull request Dec 10, 2012
@diegonehab diegonehab merged commit 114080d into lunarmodules:unstable Dec 10, 2012
@catwell
Copy link
Member Author

catwell commented Dec 10, 2012

Awesome, thank you!

@sbernard31
Copy link

Hi,
Remove all the reference to arg would be nice.

Will luasocket 2.1 will be compatible with Lua 5.1 ? Or will luasocket 2.1 be only for Lua 5.2 and luasocket 2.0 is only for Lua 5.1 ?
In the second case, it could be nice to backport those fixes on luasocket 2.0 maintenance branch.
Because, arg is deprecated in Lua 5.1 and not present in LuaJIT 2.0 (which is a Lua 5.1 VM)

@catwell
Copy link
Member Author

catwell commented Jan 23, 2013

@sbernard31 This is precisely what this commit fixes.

EDIT: Oh, sorry, maybe I misread you. I think that, even if v2.0 doesn't support Lua 5.2, v2.1 will be usable on all versions (5.1, 5.2 and LuaJIT), right @diegonehab ?

@sbernard31
Copy link

When I say

Remove all the reference to arg would be nice.

I mean remove all the references of arg in the whole codebase, not only in the ltn12 file.

You said :

Note that arg is apparently used in other parts of the codebase, but I have only hit this issue in ltn12 so far. If you think this fix is correct I can git a try at hunting use of arg in other places.

So I understood that this problem occur in other files, that's right ?

For the second point, if you are right, it's a good news :).

@catwell catwell mentioned this pull request Jan 23, 2013
@catwell
Copy link
Member Author

catwell commented Jan 23, 2013

OK, see above :)

@vesameskanen vesameskanen mentioned this pull request Aug 20, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants