Lucy
  1. Lucy
  2. LUCY-68

Simplify Charmonizer internal string handling

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Charmonizer
    • Labels:
      None

      Description

      Charmonizer's string handling utilities were originally set up so that buffer
      lengths were passed around with every char*, and so that NULLs could be
      embedded in strings without problems. This was misguided, because Charmonizer
      does not deal with untrusted user data, and there are as yet no cases where
      Charmonizer has needed to embed NULLs on its own.

      As a side effect of the implementation, Charmonizer is relatively efficient
      when it comes to memory allocation – which is of course completely worthless
      in the context of launching external compilation processes.

      The goal will be to replace the current system with more idiomatic C
      NULL-terminated strings, and throw string-handling efficiency concerns to the
      winds in pursuit of code clarity.

      1. string_handling.diff
        24 kB
        Marvin Humphrey

        Activity

        Hide
        Marvin Humphrey added a comment -

        I committed string_handling.diff as r883210. It removes most of the string
        handling functions that were in Charmonizer/Core/Util and replaces them with
        local use of malloc(), free() and sprintf().

        Show
        Marvin Humphrey added a comment - I committed string_handling.diff as r883210. It removes most of the string handling functions that were in Charmonizer/Core/Util and replaces them with local use of malloc(), free() and sprintf().

          People

          • Assignee:
            Marvin Humphrey
            Reporter:
            Marvin Humphrey
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development