Skip to content

Commit

Permalink
Use LibCrystalMain.__crystal_main directly (crystal-lang#5899)
Browse files Browse the repository at this point in the history
  • Loading branch information
bew authored and RX14 committed Apr 2, 2018
1 parent 60f675c commit 7eae5aa
Showing 1 changed file with 1 addition and 9 deletions.
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

0 comments on commit 7eae5aa

Please sign in to comment.