Skip to content

Conversation

@ab9rf
Copy link
Member

@ab9rf ab9rf commented Feb 26, 2025

This PR adds a type identity for std::filesystem::path, which is expected to be used in the upcoming experimental DF release and thus needs to be supported by the type identity system

This does not add support for paths to codegen; that needs to be done separately

The type added is not opaque; paths will be converting to Lua strings in UTF-8 encoding, and a Lua string will be converted to a path assuming UTF-8 encoding. Note that it is the developer's responsibility to convert CP437 to UTF-8, if necessary. Do not use CP-1252 or UCS-2 (wide) encoding, even on Windows; the type wrapper will take care of converting UTF-8 to UCS-2 on Windows platforms.

this should not be required, but `luaL_error` is not marked `[[noreturn]]` even though it reliably does not return, and i don't want to alter the lua module any more than absolutely necessary, so we do this here instead
@myk002 myk002 merged commit 8355542 into DFHack:develop Feb 27, 2025
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants