Permalink
Browse files

use gensym for module detail var in generated module_info

  • Loading branch information...
1 parent 55907f3 commit 7e16f4018c23ac9b945c874022e625dd8f4525a0 @ericbmerritt ericbmerritt committed Jan 3, 2012
Showing with 4 additions and 2 deletions.
  1. +4 −2 src/jxa_compile.erl
View
@@ -133,11 +133,13 @@ compile_module_info(Ctx0) ->
cerl:c_atom(get_module_info), [ModuleName]),
Ctx1 = jxa_ctx:add_exported_definition([compiler_generated], module_info, [],
ArglessBody, Ctx0),
- VarName = cerl:c_var(mdetail),
+ DetailVar = joxa:gensym(),
+ VarName = cerl:c_var(DetailVar),
ArgBody = cerl:c_call(cerl:c_atom(erlang),
cerl:c_atom(get_module_info),
[ModuleName, VarName]),
- jxa_ctx:add_exported_definition([compiler_generated], module_info, [VarName],
+ jxa_ctx:add_exported_definition([compiler_generated], module_info,
+ [VarName],
ArgBody, Ctx1).

0 comments on commit 7e16f40

Please sign in to comment.