diff --git a/chapters/functions.tex b/chapters/functions.tex index 039af5f98..4ea235c3b 100644 --- a/chapters/functions.tex +++ b/chapters/functions.tex @@ -2229,8 +2229,8 @@ \subsubsection{Records}\label{records} Arrays cannot be mapped. \end{itemize} -Records are passed by reference (i.e.\ a pointer to the record is being -passed). +Records that are the return value of the C function are returned by value. +Other records are passed by reference (i.e.\ a pointer to the record is being passed). \begin{example} \begin{lstlisting}[language=modelica] @@ -2283,10 +2283,11 @@ \subsection{Return Type Mapping}\label{return-type-mapping} \lstinline!String! & \lstinline[language=C]!const char*! & \emph{Not allowed}\\ \lstinline!T[$\mathit{dim}_{1}$, $\ldots$, $\mathit{dim}_{n}$]! & \emph{Not allowed} & \emph{Not allowed} \\ Enumeration type & \lstinline[language=C]!int! & \lstinline[language=FORTRAN77]!INTEGER!\\ -Record & See \cref{records} & \emph{Not allowed}\\ +Record & \lstinline[language=C]!struct CRec! & \emph{Not allowed}\\ \hline \end{tabular} \end{center} +For the contents of \lstinline[language=C]!struct CRec! see \cref{records}. The element type \lstinline!T! of an array can be any simple type as defined in \cref{simple-types} or, for C, a record type is returned as a value of the record type defined in \cref{records}.