diff --git a/ModelicaCompliance/Resources/Include/ExtObj.c b/ModelicaCompliance/Resources/Include/ExtObj.c index 8213a76..60daaac 100644 --- a/ModelicaCompliance/Resources/Include/ExtObj.c +++ b/ModelicaCompliance/Resources/Include/ExtObj.c @@ -10,6 +10,7 @@ #include "ExtObj.h" /* Constructor for MyTable. */ +static void* initMyTable(double *table_data, size_t table_size) { MyTable *table = (MyTable*)malloc(sizeof(MyTable)); @@ -25,7 +26,7 @@ void* initMyTable(double *table_data, size_t table_size) free(table); ModelicaError("Error allocating array in MyTable.\n"); return 0; /* Not reachable */ - } + } memcpy(table->array, table_data, table_size * sizeof(double)); table->size = table_size; @@ -34,15 +35,17 @@ void* initMyTable(double *table_data, size_t table_size) } /* Destructor for MyTable. */ +static void closeMyTable(void *object) { MyTable *table = (MyTable*)object; if (object == NULL) return; free(table->array); free(table); -} +} /* Interpolates between two adjacent values in the table. */ +static double interpolateMyTable(void *object, double u) { MyTable *table = (MyTable*)object; diff --git a/ModelicaCompliance/Resources/Include/ExtObj.h b/ModelicaCompliance/Resources/Include/ExtObj.h index b8df772..e35729b 100644 --- a/ModelicaCompliance/Resources/Include/ExtObj.h +++ b/ModelicaCompliance/Resources/Include/ExtObj.h @@ -6,8 +6,8 @@ typedef struct { unsigned size; } MyTable; -void* initMyTable(double *table_data, size_t table_size); -void closeMyTable(void* object); -double interpolateMyTable(void* object, double u); +static void* initMyTable(double *table_data, size_t table_size); +static void closeMyTable(void* object); +static double interpolateMyTable(void* object, double u); #endif /*EXTOBJ_H*/