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

Use LibCrystalMain.__crystal_main directly #5899

Merged
merged 1 commit into from
Apr 2, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 1 addition & 9 deletions src/crystal/main.cr
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,6 @@ lib LibCrystalMain
fun __crystal_main(argc : Int32, argv : UInt8**)
end

# :nodoc:
def _crystal_main(argc : Int32, argv : UInt8**)
# TODO: remove this method and embed this inside
# Crystal.main. A bug in Crystal 0.23.1 prevents invoking
# __crystal_main from anywhere except the top level.
LibCrystalMain.__crystal_main(argc, argv)
end

module Crystal
@@stdin_is_blocking = false
@@stdout_is_blocking = false
Expand Down Expand Up @@ -109,7 +101,7 @@ module Crystal
# redefine C's main function. See `Crystal.main` for
# more details.
def self.main_user_code(argc : Int32, argv : UInt8**)
_crystal_main(argc, argv)
LibCrystalMain.__crystal_main(argc, argv)
end

# :nodoc:
Expand Down