|
Move the protection of various variables to Protected_scm
protect ()/unprotect () are the basic mechanism for starting the
life-time of a Scheme Smob in a non-collectable state until it gets
referenced by some Scheme data structure. Conflating this temporary
protection with permanent protection makes it harder to gather
meaningful statistics and to do memory allocation debugging. So this
patch series makes sure that protect/unprotect is really only used
properly paired and for temporary protection.
Consists of commits:
Move the protection of all_fonts_global to Protected_scm
Previously, this abused the protect/unprotect mechanism only intended
for temporary protection.
Also turns All_font_metrics into a Scheme Smob.
Move the protection of global_translator_dict to Protected_scm
Previously, this abused the protect/unprotect mechanism only intended
for temporary protection.
Move the protection of default_global_scale to Protected_scm
Previously, this abused the protect/unprotect mechanism only intended
for temporary protection.
|