- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 398
Description
PRs like #3097 and #3095 introduced some copy-pasta creep into NUT code base (with collect_string and analyze_mapping_usage methods in particular), which would do well to be refactored into some shared implementation of what is currently nuancely-different code.
Maybe we can refactor the data structure involved here, to merge code with common str_add_unique_token etc. methods?
Code parked in PR #2476 can also be useful here, modulo that use-cases to be refactored also want to add separators - so another argument to something like that str_concat() method. Currently the in-tree code uses a sentinel NULL to end off the array of strings, and str_concat() uses a count argument with varargs to limit the stack walk. Not sure if one approach is fully better over the other, or they just fit different use-cases.