Skip to content

Commit

Permalink
- Fix for ctor index -1 (bootstrapping C runtime)
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@9484 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
sjoelund committed Jul 15, 2011
1 parent 494b310 commit 85d6d37
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Compiler/FrontEnd/Types.mo
Expand Up @@ -1194,7 +1194,7 @@ algorithm
list<Var> rest;
Values.Value v;
list<Values.Value> vs;
Ident id;
String id,str;
list<Ident> ids;

case ({},{}) then {};
Expand Down
2 changes: 1 addition & 1 deletion Compiler/runtime/Dynload.cpp
Expand Up @@ -397,7 +397,7 @@ static int mmc_to_value(void* mmc, void** res)
namelst = mk_cons(mk_scon(t != NULL ? (const char*) t : "(null)"), namelst);
}
*res = (void *) Values__RECORD(name_to_path(desc->path),
varlst, namelst, mk_icon(ctor-3));
varlst, namelst, mk_icon(((long)ctor)-3));
return 0;
}

Expand Down
4 changes: 2 additions & 2 deletions c_runtime/meta/meta_modelica.c
Expand Up @@ -222,11 +222,11 @@ inline static int anyStringWork(void* any, int ix)
int i;
void *data;
struct record_description *desc;
char buf[34] = {0};
/* char buf[34] = {0}; */

if (MMC_IS_IMMEDIATE(any)) {
checkAnyStringBufSize(ix,40);
ix += sprintf(anyStringBuf+ix, "%ld", (long) MMC_UNTAGFIXNUM(any));
ix += sprintf(anyStringBuf+ix, "%ld", (signed long) MMC_UNTAGFIXNUM(any));
return ix;
}

Expand Down

0 comments on commit 85d6d37

Please sign in to comment.