Support #488

tpsetctxt() shall not free up current context, tpgetctxt() shall not remove current context id on get

Added by Madars over 4 years ago. Updated over 4 years ago.

Status:NewStart date:12/12/2019
Priority:Normal (Code 4)Due date:
Assignee:-% Done:

0%

Category:-
Target version:-

Description

Both functions tpgetctxt() and tpgetctxt() shall be aligned accordingly to the standard.

History

#1 Updated by Madars over 4 years ago

For example scenario with:

- tpinit();
- tpgetctxt(&CTX1);
- tpsetctxt(TPNULL)
- tpinit();
- tpgetctxt(&CTX2);

Then running:
tpsetctxt(&CTX1);
tpsetctxt(&CTX2); <<< This would make CTX1 free, which is incorrect.

#2 Updated by Madars over 4 years ago

Also if even doing free of previous, I guess it should check is it auto or not. Also then by default allocated contexts shall not be marked as auto.

#3 Updated by Madars over 4 years ago

tpterm shall re-visited, so that it would terminate the ctxt.

Also available in: Atom PDF