Skip to content

Commit

Permalink
fix definition of Module constructor in Core
Browse files Browse the repository at this point in the history
  • Loading branch information
vtjnash committed Apr 26, 2015
1 parent 456c222 commit d3843d0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion base/boot.jl
Original file line number Diff line number Diff line change
Expand Up @@ -283,11 +283,13 @@ _new(:NewvarNode, :Symbol)
_new(:QuoteNode, :ANY)
_new(:GenSym, :Int)

Module(name::Symbol=:anonymous, std_imports::Bool=true) = ccall(:jl_f_new_module, Any, (Any, Int32), name, std_imports)::Module
Module(name::Symbol=:anonymous, std_imports::Bool=true) = ccall(:jl_f_new_module, Any, (Any, Bool), name, std_imports)::Module

Task(f::ANY) = ccall(:jl_new_task, Any, (Any, Int), f::Function, 0)::Task

# simple convert for use by constructors of types in Core
# note that there is no actual conversion defined here,
# so the methods and ccall's in Core aren't permitted to use convert
convert(::Type{Any}, x::ANY) = x
convert{T}(::Type{T}, x::T) = x
cconvert(T::Type, x) = convert(T, x)
Expand Down
2 changes: 1 addition & 1 deletion src/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jl_module_t *jl_new_module(jl_sym_t *name)
return m;
}

DLLEXPORT jl_value_t *jl_f_new_module(jl_sym_t *name, int std_imports)
DLLEXPORT jl_value_t *jl_f_new_module(jl_sym_t *name, uint8_t std_imports)
{
jl_module_t *m = jl_new_module(name);
m->parent = jl_main_module;
Expand Down

0 comments on commit d3843d0

Please sign in to comment.