Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1704)

Issue 233560043: Move the protection of various variables to Protected_scm (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
8 years, 11 months ago by dak
Modified:
8 years, 10 months ago
Reviewers:
CC:
lilypond-devel_gnu.org
Visibility:
Public.

Description

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.

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+43 lines, -29 lines) Patch
M lily/all-font-metrics.cc View 4 chunks +16 lines, -8 lines 0 comments Download
M lily/all-font-metrics-scheme.cc View 1 chunk +5 lines, -1 line 0 comments Download
M lily/include/all-font-metrics.hh View 2 chunks +2 lines, -1 line 0 comments Download
M lily/scale.cc View 3 chunks +13 lines, -15 lines 0 comments Download
M lily/translator-ctors.cc View 2 chunks +7 lines, -4 lines 0 comments Download

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b