Files
harfbuzz/src
Behdad Esfahbod 5b4b363e20 [internal] RAII sweep (second batch): 12 more cleanup sites
Convert additional cleanup patterns across the codebase to use
HB_SCOPE_GUARD / hb_make_scope_guard.  All changes are mechanical
replacements of goto-based cleanup with scope guards; no behavior
changes.

Destroy-on-fail funcs-setter pattern (identical body in four files):
  - hb-draw.cc _hb_draw_funcs_set_middle
  - hb-font.cc _hb_font_funcs_set_middle
  - hb-paint.cc _hb_paint_funcs_set_middle
  - hb-unicode.cc HB_UNICODE_FUNC_IMPLEMENT macro
  Replace two goto-fail sites per function with one scope guard that
  runs destroy(user_data), released on the success path.

Resource cleanup with multi-exit paths:
  - hb-gdi.cc _hb_gdi_reference_table: GDI DC + hb_malloc buffer
    via paired scope guards; collapse three fail labels to returns.
  - hb-wasm-shape.cc face-data init: wasm_blob + wasm_module via
    scope guards.
  - hb-uniscribe.cc _hb_rename_font: hb_blob + hb_calloc'd sfnt
    buffer via scope guards.
  - hb-ft.cc _hb_ft_reference_table: hb_malloc'd FT buffer via
    scope guard.
  - hb-ot-font.cc hb_ot_draw_glyph_or_fail: release_gvar_cache via
    scope guard; remove the goto done cascade in the backend walk.
  - hb-raster-draw.cc hb_raster_draw_render: per-exit state reset
    via scope guard; image cleanup via scope guard released on
    success.
  - hb-coretext.cc CTFontCopyAvailableTables walker + variations
    extractor: CFRelease pairs via scope guards.

Pure control-flow cleanup (no RAII, just goto→return):
  - hb-raster-paint.cc: four "goto done" sites in gradient paint
    funcs where done: body was only (void) stops_ — remove label,
    use return directly.

All 240 tests still pass.

Assisted-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 20:09:44 -06:00
..
2025-05-08 16:03:02 +03:00
2023-07-08 13:51:07 -04:00
2026-03-10 09:56:47 -03:00
2026-03-09 22:37:07 -06:00
2026-03-09 22:37:07 -06:00
2024-03-30 02:20:21 +02:00
2025-08-15 00:54:52 -06:00
2025-03-13 01:07:35 -06:00
…
2025-10-17 15:23:05 -06:00
2026-02-24 16:57:44 -03:00
2025-03-12 23:56:52 -06:00
2023-02-21 18:07:53 +02:00
2026-04-12 19:29:56 -06:00
2025-04-08 02:13:39 -06:00
2025-03-12 18:27:27 -06:00
2025-07-20 21:40:37 +03:00
2025-03-24 00:33:53 +02:00
2025-09-15 23:56:25 -06:00
…
…
2026-04-01 14:54:05 +02:00
2024-10-27 16:14:53 -07:00
…
2025-08-29 00:08:28 -06:00
2023-08-25 07:51:05 -06:00
2023-06-03 14:56:47 -06:00
2025-04-08 01:58:10 -06:00
2025-08-07 22:38:58 -06:00
2025-06-08 13:43:27 +03:00
2023-02-11 23:52:58 +02:00
2025-08-07 22:38:58 -06:00
2025-08-27 15:36:48 -06:00
2026-03-19 00:45:24 +02:00
2026-03-19 00:45:24 +02:00
2025-02-06 14:26:37 +00:00
2025-11-11 12:29:06 -07:00
2025-06-08 13:43:27 +03:00
2024-04-16 17:10:09 -06:00
2025-06-08 13:43:27 +03:00
…
2025-06-08 13:43:27 +03:00
2025-06-08 13:43:27 +03:00
2026-03-09 22:37:07 -06:00
2026-03-08 00:03:57 +02:00
2025-11-10 02:55:44 -07:00
2025-10-01 08:24:34 +03:00
2025-09-15 23:56:25 -06:00
2025-09-23 11:23:03 -04:00
2023-08-25 07:51:05 -06:00
2023-06-03 14:56:47 -06:00
2025-07-23 21:39:23 +03:00
2025-08-07 22:38:58 -06:00
2024-08-23 08:58:50 -06:00
2025-01-11 18:13:18 +02:00
2025-01-11 18:13:18 +02:00
2025-07-25 00:05:46 -06:00
2026-04-01 14:54:05 +02:00
2025-07-24 22:47:08 -06:00
…
2023-04-27 00:48:00 +02:00
2025-05-12 14:05:39 -06:00
2025-08-28 15:58:39 -06:00
2026-04-13 02:56:09 +02:00
2026-04-04 20:31:18 +02:00
2024-04-01 01:55:38 -06:00
2023-03-31 17:33:45 -06:00
…
2025-03-07 18:19:29 -07:00
…
…