Fundamental Theorem of Complex Calculus

Hello everyone, I was having trouble with the proof of this and I was wondering if anyone could help me!

Let $\displaystyle f:S \rightarrow \mathbb{C}$ be analytic (where S is an open set), and such that if $\displaystyle \gamma : [a,b] \rightarrow S$ is a piecewise continuously differentiable path in S, then if f' is continuous on $\displaystyle \gamma^* $(which is always true anyway), and$\displaystyle z_1:= \gamma (a), z_2:= \gamma (b),$

then $\displaystyle \int_{\gamma} f'(z)dz = f(z_2)-f(z_1)$

PROOF: Write $\displaystyle \gamma $as $\displaystyle \gamma_1 + \gamma_2 + \ldots + \gamma_n$, where each $\displaystyle \gamma_i : [t_{i-1}, t_i] \rightarrow S$ is a simple smooth path, with $\displaystyle \gamma_i (t_i) = \gamma_{i+1} (t_i), \gamma_1 (t_1) := \gamma(a), \gamma_n (t_n) := \gamma (b).$

Then $\displaystyle \int_{\gamma_i} f'(z) dz = \int_{t_{i-1}}^{t_i} f '(\gamma_i (t) ) \gamma_i ' (t) dt = \int_{t_{i-1}}^{t_i} \dfrac{d}{dt} f ( \gamma_i (t) ) dt = $ now here I have a problem because it says this line is equal to

$\displaystyle

\left[ f(\gamma_i (t)) \right]_{t_{i-1}}^{t^i}

$ by the fundamental theorem of calculus for REAL functions. however $\displaystyle f \circ \gamma_i $ is not real valued is it? so why can i use it here?