Skip to content

Restrict CCompRC::LoadResourceFile and usage to win - #41757

Merged
jkotas merged 1 commit into
dotnet:masterfrom
am11:feature/unixtodo/LoadResourceFile
Sep 3, 2020
Merged

jkotas merged 1 commit into
dotnet:masterfrom
am11:feature/unixtodo/LoadResourceFile

Conversation

@am11

@am11 am11 commented Sep 2, 2020 •

Copy link
Copy Markdown
Member

String resouces packaged as PE files only exist on Windows.

@Dotnet-GitSync-Bot

Copy link
Copy Markdown
Collaborator

I couldn't figure out the best area label to add to this PR. If you have write-permissions please help me learn by adding exactly one area label.

@jkotas

jkotas commented Sep 2, 2020

Copy link
Copy Markdown
Member

It is not interesting to do anything here unless it is part of a larger plan for localization of error messages produced by unmanaged code. You can replace the UNIXTODO with a comment or something.

cc @janvorli

@jkotas jkotas added the area-PAL-coreclr only for closed issues label Sep 2, 2020
Comment thread src/coreclr/src/utilcode/ccomprc.cpp Resolved
@am11 am11 closed this Sep 3, 2020
@am11 am11 reopened this Sep 3, 2020
@am11 am11 changed the title Implement CCompRC::LoadResourceFile for Unix Restrict CCompRC::LoadResourceFile and usage to win Sep 3, 2020
@am11
am11 marked this pull request as ready for review September 3, 2020 12:00
Comment thread src/coreclr/src/utilcode/ccomprc.cpp Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

You can use just single #ifdef / #endif with th3 #ifdef before the EX_TRY above and #endif before the return.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The whole function should be unreachable on non-Windows. It would be best to itdef-out the whole function.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Moved LoadLibraryHelper and LoadResourceFile functions under a single ifdef.

Comment thread src/coreclr/src/inc/utilcode.h Resolved
String resouces packaged as PE files only exist on Windows.
@jkotas

jkotas commented Sep 3, 2020

Copy link
Copy Markdown
Member

Test failure is #37132

@jkotas

jkotas commented Sep 3, 2020

Copy link
Copy Markdown
Member

Thanks!

@jkotas
jkotas merged commit ed94902 into dotnet:master Sep 3, 2020
@am11
am11 deleted the feature/unixtodo/LoadResourceFile branch September 3, 2020 22:30
@ghost ghost locked as resolved and limited conversation to collaborators Dec 28, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-PAL-coreclr only for closed issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants