Skip to content

Commit

Permalink
FIX: better fix for previous (warning) fix (as Clang requires char **…
Browse files Browse the repository at this point in the history
… for second parameter of main function)
  • Loading branch information
Oldes committed Apr 25, 2018
1 parent 2864f60 commit 472b2c7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/os/host-main.c
Original file line number Diff line number Diff line change
Expand Up @@ -235,18 +235,18 @@ int APIENTRY WinMain(HINSTANCE inst, HINSTANCE prior, LPSTR cmd, int show) {
REBCHR **argv;
App_Instance = inst;
#else
int main(int argc, REBCHR **argv) {
int main(int argc, char **argv) {
// Retrieves the window handle used by the console associated with the calling process
HWND hwndC = GetConsoleWindow();
// Then we could just get the HINSTANCE:
App_Instance = GetModuleHandle(0); // HMODULE=HINSTANCE
#endif
// Fetch the win32 unicoded program arguments:
argv = CommandLineToArgvW(GetCommandLineW(), &argc);
(LPWSTR*)argv = CommandLineToArgvW(GetCommandLineW(), &argc);
// Use title string as defined in resources file (.rc) with hardcoded ID 101
LoadStringW(App_Instance, 101, App_Title, MAX_TITLE_LENGTH);
#else //non Windows platforms
int main(int argc, REBCHR **argv) {
int main(int argc, char **argv) {
#endif
REBYTE vers[8];
REBINT n;
Expand All @@ -257,7 +257,7 @@ int main(int argc, REBCHR **argv) {

Host_Lib = &Host_Lib_Init;

Parse_Args(argc, argv, &Main_Args);
Parse_Args(argc, (REBCHR **)argv, &Main_Args);

vers[0] = 5; // len
RL_Version(&vers[0]);
Expand Down

0 comments on commit 472b2c7

Please sign in to comment.