Cloning

As stated before, fz_text objects are referenced counted. Changes or manipulations cannot safely be carried out on an object which might be shared with someone else, so we provide a mechanism to clone an object. Once cloned an object is guaranteed to be safe to modify.


\begin{lstlisting}
/*
fz_clone_text: Clone a text object.
\par
text: The text o...
.../
fz_text *fz_clone_text(fz_context *ctx, const fz_text *text);
\end{lstlisting}