Skip to content

Commit

Permalink
- add boxptr_arrayUpdate, to use arrayUpdate with List.fold1r
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@12206 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
Jens Frenkel committed Jun 25, 2012
1 parent 097a678 commit 7b1fb8d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions SimulationRuntime/c/meta/meta_modelica_builtin.c
Expand Up @@ -697,6 +697,11 @@ modelica_metatype arrayUpdate(modelica_metatype arr, modelica_integer ix, modeli
return arr;
}

modelica_metatype boxptr_arrayUpdate(modelica_metatype arr, modelica_integer ix, modelica_metatype val)
{
return arrayUpdate(arr,MMC_UNTAGFIXNUM(ix),val);
}

modelica_metatype arrayCopy(modelica_metatype arr)
{
mmc_GC_add_roots(&arr, 1, 0, "");
Expand Down
1 change: 1 addition & 0 deletions SimulationRuntime/c/meta/meta_modelica_builtin.h
Expand Up @@ -122,6 +122,7 @@ extern modelica_metatype arrayAdd(modelica_metatype, modelica_metatype);
#define boxptr_arrayCopy arrayCopy
extern modelica_metatype boxptr_arrayNth(modelica_metatype,modelica_metatype);
extern modelica_metatype boxptr_arrayGet(modelica_metatype,modelica_metatype);
extern modelica_metatype boxptr_arrayUpdate(modelica_metatype, modelica_integer, modelica_metatype);

/* Misc Operations */
extern void print(modelica_metatype);
Expand Down

0 comments on commit 7b1fb8d

Please sign in to comment.