Skip to content

Commit

Permalink
- Added support for enumerations in external C functions.
Browse files Browse the repository at this point in the history
  + This causes RollingWheelSetPulling.mos to print some extra warnings (because the annotations for external C functions are missing in the multibody testsuite).


git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@5153 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
sjoelund committed Mar 16, 2010
1 parent 4059df1 commit a1c2e00
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Compiler/Codegen.mo
Expand Up @@ -2020,6 +2020,7 @@ algorithm
case ((DAE.T_REAL(varLstReal = _),_)) then "double";
case ((DAE.T_STRING(varLstString = _),_)) then "const char*";
case ((DAE.T_BOOL(varLstBool = _),_)) then "int";
case ((DAE.T_ENUMERATION(index = _),_)) then "int";
case ((DAE.T_COMPLEX(complexClassType = ClassInf.RECORD(name)),_))
local Absyn.Path name;
equation
Expand All @@ -2043,7 +2044,8 @@ algorithm
case ((DAE.T_COMPLEX(complexClassType = ClassInf.EXTERNAL_OBJ(_)),_)) then "void *";
case ty
equation
Debug.fprint("failtrace", "#-- Codegen.generateTypeExternal failed\n");
true = RTOpts.debugFlag("failtrace");
Debug.traceln("#-- Codegen.generateTypeExternal failed: " +& Types.unparseType(ty));
then
fail();
end matchcontinue;
Expand Down

0 comments on commit a1c2e00

Please sign in to comment.