Skip to content

Commit

Permalink
- boxptr_arrayGet
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@9649 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
sjoelund committed Aug 17, 2011
1 parent 50509fa commit c35b42d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions c_runtime/meta/meta_modelica_builtin.cpp
Expand Up @@ -517,6 +517,11 @@ arrayGet_rettype arrayGet(modelica_metatype arr, modelica_integer ix)
return MMC_STRUCTDATA(arr)[ix-1];
}

modelica_metatype boxptr_arrayGet(modelica_metatype a, modelica_metatype i)
{
return arrayGet(a,MMC_UNTAGFIXNUM(i));
}

arrayCreate_rettype arrayCreate(modelica_integer nelts, modelica_metatype val)
{
void* arr = (struct mmc_struct*)mmc_mk_box_no_assign(nelts, MMC_ARRAY_TAG);
Expand Down
1 change: 1 addition & 0 deletions c_runtime/meta/meta_modelica_builtin.h
Expand Up @@ -154,6 +154,7 @@ arrayAdd_rettype arrayAdd(modelica_metatype, modelica_metatype);
#define boxptr_arrayList arrayList
#define boxptr_arrayCopy arrayCopy
modelica_metatype boxptr_arrayNth(modelica_metatype,modelica_metatype);
modelica_metatype boxptr_arrayGet(modelica_metatype,modelica_metatype);

/* Misc Operations */
typedef modelica_integer tick_rettype;
Expand Down

0 comments on commit c35b42d

Please sign in to comment.