Skip to content

Commit

Permalink
more fixes ticket:3902
Browse files Browse the repository at this point in the history
  • Loading branch information
adrpo authored and OpenModelica-Hudson committed Jun 1, 2016
1 parent 1aab55e commit c7a21ff
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions SimulationRuntime/c/meta/meta_modelica.h
Expand Up @@ -58,8 +58,6 @@ static inline void* mmc_mk_icon(mmc_sint_t i)
return MMC_IMMEDIATE(MMC_TAGFIXNUM(i));
}

void* mmc_mk_rcon(double d);

union mmc_double_as_words {
double d;
mmc_uint_t data[2];
Expand Down Expand Up @@ -187,6 +185,21 @@ struct record_description {
const char** fieldNames;
};

#if defined(OMC_MINIMAL_RUNTIME)
static void* mmc_mk_rcon(double d)
{
struct mmc_real *p = (struct mmc_real*)mmc_alloc_words_atomic(MMC_SIZE_DBL/MMC_SIZE_INT + 1);
mmc_prim_set_real(p, d);
p->header = MMC_REALHDR;
#ifdef MMC_MK_DEBUG
fprintf(stderr, "REAL size: %u\n", MMC_SIZE_DBL/MMC_SIZE_INT+1); fflush(NULL);
#endif
return MMC_TAGPTR(p);
}
#else
void* mmc_mk_rcon(double d);
#endif

#include "openmodelica.h"
#include "meta_modelica_segv.h"
#include "meta_modelica_builtin.h"
Expand Down

0 comments on commit c7a21ff

Please sign in to comment.