Skip to content

Commit

Permalink
Replace macro locking with an internal RAII-style C++ API
Browse files Browse the repository at this point in the history
Force all macro access through a C++ class which locks the context
in constructor, convert all access to go through it and voila. This
lets caller do multiple macro operations on one lock/unlock cycle,
whereas the C API is forced to do one on each and every call.

Generally the APIs with their C strings have been left alone, but
the expand variants always return an actual result code, and take and
return C++ strings to free callers, which is the other big benefit here.

This looks big but is actually rather straightforward. New tests are not
really needed because the C API internally now uses this API, and that
gets thoroughly exercised.
  • Loading branch information
pmatilai authored and dmnks committed Nov 4, 2024
1 parent 7e9a80d commit 439a601
Show file tree
Hide file tree
Showing 2 changed files with 240 additions and 150 deletions.
Loading

0 comments on commit 439a601

Please sign in to comment.