How HMAC.Update function works? I know how standard HMAC(key,msg) function works, and I want to write a Delphi port of HMAC class that implements Update function. The problem is that I don't understand how this Update function works (for example of Update function, see SSL definition here: https://www.openssl.org/docs/crypto/hmac.html).

If I understand this correctly, these two pieces of pseudocode should return the same HMAC (e.g. Result1 = Result2):

Code 1:
HMAC.Init;
HMAC.Update('key','abc');
HMAC.Update('key','def');
Result1 = HMAC.Digest;

Code 2:
HMAC.Init;
HMAC.Update('key','abcdef');
Result2 = HMAC.Digest;

I have found Python implementation here: https://hg.python.org/cpython/file/2.7/Lib/hmac.py but I have no knowledge of Python (I am Delphi programmer) and I don't undesrtand it. Could somebody explain it to me, or, possible provide an example of pseudocode/Delphi?

EDIT:
Probably I should have given some more details about the  reason I have asked this question. Basically, I need to calculate HMAC(key,msg) where msg is a content of a stream/file, which can be big - and therefore its contents can't be passed to HMAC function at once. Therefore I need to read blocks of the stream and continuously update the HMAC message, so that after whole stream/file was processed, HMAC digest contains HMAC of the whole stream.
Let's shortly recall, how HMAC looks like:

$HMAC_K(M):=H((K\oplus opad) || H((K \oplus ipad) || M))$

As you may observe here, the calculation of the outer hash is fully independant of the message.

So the standard approach into implenting "update" functionality is to store the key and go as follows:

Init(Key):
Store the Key in K
Init two Hash-function instances H1 and H2
Feed (K XOR IPAD) into H1
Feed (K XOR OPAD) into H2

Update(Message):
Feed the Message into H1

Final:
Get the digest of H1 and feed it into H2
Output the digest of H2