|
@@ -455,7 +455,7 @@ let make_macro_api ctx mctx p =
|
|
|
let mctx = (match ctx.g.macros with None -> die "" __LOC__ | Some (_,mctx) -> mctx) in
|
|
|
let ttype = Typeload.load_instance mctx (make_ptp cttype p) ParamNormal LoadNormal in
|
|
|
let f () = Interp.decode_type_def v in
|
|
|
- let m, tdef, pos = safe_decode ctx.com v "TypeDefinition" ttype p f in
|
|
|
+ let mpath, tdef, pos = safe_decode ctx.com v "TypeDefinition" ttype p f in
|
|
|
let has_native_meta = match tdef with
|
|
|
| EClass d -> Meta.has Meta.Native d.d_meta
|
|
|
| EEnum d -> Meta.has Meta.Native d.d_meta
|
|
@@ -465,7 +465,7 @@ let make_macro_api ctx mctx p =
|
|
|
in
|
|
|
let add is_macro ctx =
|
|
|
let mdep = Option.map_default (fun s -> TypeloadModule.load_module ~origin:MDepFromMacro ctx (parse_path s) pos) ctx.m.curmod mdep in
|
|
|
- let mnew = TypeloadModule.type_module ctx.com ctx.g ~dont_check_path:(has_native_meta) m (ctx.com.file_keys#generate_virtual ctx.com.compilation_step) [tdef,pos] pos in
|
|
|
+ let mnew = TypeloadModule.type_module ctx.com ctx.g ~dont_check_path:(has_native_meta) mpath (ctx.com.file_keys#generate_virtual mpath ctx.com.compilation_step) [tdef,pos] pos in
|
|
|
mnew.m_extra.m_kind <- if is_macro then MMacro else MFake;
|
|
|
add_dependency mnew mdep MDepFromMacro;
|
|
|
add_dependency mdep mnew MDepFromMacroDefine;
|
|
@@ -502,7 +502,7 @@ let make_macro_api ctx mctx p =
|
|
|
end else
|
|
|
ignore(TypeloadModule.type_types_into_module ctx.com ctx.g m types pos)
|
|
|
with Not_found ->
|
|
|
- let mnew = TypeloadModule.type_module ctx.com ctx.g mpath (ctx.com.file_keys#generate_virtual ctx.com.compilation_step) types pos in
|
|
|
+ let mnew = TypeloadModule.type_module ctx.com ctx.g mpath (ctx.com.file_keys#generate_virtual mpath ctx.com.compilation_step) types pos in
|
|
|
mnew.m_extra.m_kind <- MFake;
|
|
|
add_dependency mnew ctx.m.curmod MDepFromMacro;
|
|
|
add_dependency ctx.m.curmod mnew MDepFromMacroDefine;
|