Menu

const for ApacheRequestRec::rputs()

2001-11-08
2001-11-12
  • Kurt M. Brown

    Kurt M. Brown - 2001-11-08

    I added the const to support passing the return of std::string::c_str(). I also changed the argument name because I use std::string a lot and though it  does not conflict, it looks funny.

    Here is my diff against your latest sources.

    $ cvs diff include/cpp_request.h src/cpp_request.cpp
    Index: include/cpp_request.h
    ===================================================================
    RCS file: /cvsroot/modcplusplus/mod_cplusplus/include/cpp_request.h,v
    retrieving revision 1.3
    diff -r1.3 cpp_request.h
    93c93
    <     int rputs(char *string);
    ---
    >     int rputs(const char* str);
    Index: src/cpp_request.cpp
    ===================================================================
    RCS file: /cvsroot/modcplusplus/mod_cplusplus/src/cpp_request.cpp,v
    retrieving revision 1.2
    diff -r1.2 cpp_request.cpp
    80c80
    < int ApacheRequestRec::rputs(char *string)
    ---
    > int ApacheRequestRec::rputs(const char* str)
    82c82
    <     return ap_rputs(string, mRequest);
    ---
    >     return ap_rputs(str, mRequest);

     
    • John Sterling

      John Sterling - 2001-11-12

      Sweet --- nice work.  committed.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.