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

Unicode file functions for Windows #785

Merged
merged 5 commits into from
May 25, 2017
Merged

Unicode file functions for Windows #785

merged 5 commits into from
May 25, 2017

Conversation

SirLynix
Copy link
Contributor

Hello,

As we discussed in my last PR (#728) I'm now proposing unicode override for Lua base functions (io.open, os.remove and os.rename).

I tried to respect the Lua API but this made me duplicate some code unfortunatly.

@SirLynix SirLynix changed the title Unicode file operations win32 Unicode file functions for Windows May 14, 2017
@SirLynix
Copy link
Contributor Author

I have no idea why AppVeyor is failing

@tvandijck
Copy link
Contributor

I gave it a kick to try again... but 0xc0000005 is typically a memory access violation...

@tvandijck
Copy link
Contributor

Tried it two times, but it's consistently failing with the same error... I'm assuming some kind of null pointer exception... I unfortunately don't have the time today to try and repro this locally...

@SirLynix
Copy link
Contributor Author

I have troubles to run Premake (output exec) on Windows, I'll try to fix this.

@SirLynix
Copy link
Contributor Author

SirLynix commented May 17, 2017

Finally managed to build and run premake on my computer and it works like a charm.. :/
Edit: Well it worked because I didn't close those files (see below).

@SirLynix
Copy link
Contributor Author

SirLynix commented May 18, 2017

I found the problem, it's because of that weird environnement which defines a close function for file handles (causing the null pointer crash when an unicode file tries to close as it has no close function).

I tried many things, but there are a lot of problem involved with the override post-init of io functions (which seems to be fixed in Lua 5.2! Why is Premake still in Lua 5.1? 😄 ).

I have no choice right now than to override liolib.c in Lua library... Hopefully it's a small change.

@tvandijck
Copy link
Contributor

We've talked about upgrading Lua a few times, not sure what the general opinion is by now. At Blizzard we're on 5.3.4, but I think there is a few local changes that premake made to Lua that we didn't integrate. I don't think we're noticing it however... so not sure what the deal is...

That aside, these changes look fine to me. I think it would be awesome if lua itself got these changes committed however. Would help lua itself too, and 5.3 actually has utf8 functionality.

@tvandijck tvandijck merged commit 235d364 into premake:master May 25, 2017
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