Skip to content

Commit

Permalink
Mangle arguments of record constructors
Browse files Browse the repository at this point in the history
* adding omc_ as prefix to the arguments of record constructors
  • Loading branch information
lochel committed Dec 15, 2015
1 parent 49e67ac commit 2d0bc6b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Compiler/Template/CodegenCFunctions.tpl
Expand Up @@ -342,7 +342,7 @@ template functionHeader(Function fn, Boolean inFunc, Boolean isSimulation, Text
>>
case RECORD_CONSTRUCTOR(__) then
let fname = underscorePath(name)
let funArgsStr = (funArgs |> var as VARIABLE(__) => ', <%varType(var)%> <%crefStr(name)%>')
let funArgsStr = (funArgs |> var as VARIABLE(__) => ', <%varType(var)%> omc_<%crefStr(name)%>')
<<
<% match visibility case PUBLIC() then "DLLExport" %>
<%fname%> omc_<%fname%>(threadData_t *threadData<%funArgsStr%>); /* record head */
Expand Down Expand Up @@ -1353,11 +1353,11 @@ case RECORD_CONSTRUCTOR(__) then
let boxedFn = functionBodyBoxed(fn, isSimulation)
<<
<%auxFunction%>
<%fname%> omc_<%fname%>(threadData_t *threadData<%funArgs |> VARIABLE(__) => ', <%expTypeArrayIf(ty)%> <%crefStr(name)%>'%>)
<%fname%> omc_<%fname%>(threadData_t *threadData<%funArgs |> VARIABLE(__) => ', <%expTypeArrayIf(ty)%> omc_<%crefStr(name)%>'%>)
{
<%varDecls%>
<%varInits%>
<%funArgs |> VARIABLE(__) => '<%structVar%>._<%crefStr(name)%> = <%crefStr(name)%>;' ;separator="\n"%>
<%funArgs |> VARIABLE(__) => '<%structVar%>._<%crefStr(name)%> = omc_<%crefStr(name)%>;' ;separator="\n"%>
return <%structVar%>;
}

Expand Down

0 comments on commit 2d0bc6b

Please sign in to comment.