Skip to content

Commit

Permalink
- Fixed MetaModelica crefs to function names containing underscores
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@4371 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
sjoelund committed Oct 19, 2009
1 parent c515ae9 commit 414b3ff
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions Compiler/Codegen.mo
Expand Up @@ -5701,12 +5701,11 @@ algorithm

/* function pointer case - stefan */
case (cref,Exp.T_FUNCTION_REFERENCE(),tnr,context)
local String fn_name;
local String fn_name; Absyn.Path path;
equation
(cref_str,{}) = compRefCstr(cref);
fn_name = Util.stringReplaceChar(cref_str,".","_");
fn_name = stringAppend("_",fn_name);
cref_str = stringAppend("(modelica_fnptr)",fn_name);
path = Exp.crefToPath(cref);
fn_name = generateFunctionName(path);
cref_str = stringAppend("(modelica_fnptr)_",fn_name);
then
(cEmptyFunction,cref_str,tnr);

Expand Down

0 comments on commit 414b3ff

Please sign in to comment.