Uploaded image for project: 'Subversion'
  1. Subversion
  2. SVN-3555

Remove the "line_filter" and "line_transformer" callbacks from svn_stream_t

    XMLWordPrintableJSON

Details

    • Task
    • Status: Closed
    • Major
    • Resolution: Fixed
    • trunk
    • 1.7.0
    • libsvn_subr
    • None

    Description

      The svn_stream_set_line_filter_callback() and
      svn_stream_set_line_transformer_callback() and associated API changes made for
      v1.7 should be removed. The main problem is they are architecturally wrong.
      
      Filtering is one of the basic uses for streams. For any filtering task with
      streams - including compression, modification, etc. - the good solution is to
      define a wrapper stream that does the job, not add special callbacks to the
      generic stream template.
      
      The readline() function is not a generic stream method, just a helper function,
      and we should not have defined callbacks in the stream that are used only by a
      helper function. The line_*_callback() functions were a sort of poor-man's
      substitute for a virtual readline() method.
      
      A couple of possible solutions are:
      
        * have the user implement the required filtering as a wrapper stream;
      
        * make readline() a virtual method of svn_stream_t and then have the user
      provide replacement implementations of readline() for doing the required filtering.
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            julianfoad Julian Foad
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: