CodeMod apache::thrift::transport::TSocketAddress to folly::SocketAddress.
authorYedidya Feldblum <yfeldblum@fb.com>
Wed, 12 Aug 2015 20:29:16 +0000 (13:29 -0700)
committerfacebook-github-bot-9 <folly-bot@fb.com>
Wed, 12 Aug 2015 21:20:37 +0000 (14:20 -0700)
Summary: [Folly] CodeMod apache::thrift::transport::TSocketAddress to folly::SocketAddress.

    yes | codemod --extensions h,tcc,cpp '^#include [<"]thrift/lib/cpp/transport/TSocketAddress\.h[>"]$' '#include <folly/SocketAddress.h>'
    yes | codemod --extensions h,tcc '\b(((apache::)?thrift::)?transport::)?TSocketAddress\b' 'folly::SocketAddress'
    yes | codemod --extensions cpp '^using apache::thrift::transport::TSocketAddress;$' 'using folly::SocketAddress;'
    yes | codemod --file-list "$(git ls-files "**/*.cpp" | xargs grep -P '^using (namespace folly|folly::SocketAddress);$' | cut -d: -f1 | paste -s -d,)" '\b(((apache::)?thrift::)?transport::)?TSocketAddress\b' 'SocketAddress'
    yes | codemod --extensions cpp '\b(((apache::)?thrift::)?transport::)?TSocketAddress\b' 'folly::SocketAddress'
    yes | codemod --extensions h,tcc,cpp -m '^\s*typedef folly::SocketAddress folly::SocketAddress;\n' ''
    yes | codemod --file-list thrift/lib/cpp/Makefile.am -m '^\s*transport/TSocketAddress\.h \\\n' ''
    rm thrift/lib/cpp/transport/TSocketAddress.h

Reviewed By: @Invalid auth token., @​luk

Differential Revision: D2325523

folly/SocketAddress.h
folly/io/async/AsyncServerSocket.h

index 8f93953ad9a61d41d92d612d1130a0d17a134f6b..4f0d9cfc258539ad108d3c1b00ba7b9a606083c7 100644 (file)
@@ -306,7 +306,7 @@ class SocketAddress {
   void setFromLocalAddress(SocketDesc socket);
 
   /**
-   * Initialize this TSocketAddress from a struct sockaddr.
+   * Initialize this folly::SocketAddress from a struct sockaddr.
    *
    * Raises std::system_error on error.
    *
index 26662fc9c41122a7f13a025003c2e9c88ec1390c..51fc6493a5893910fc137f4711af37da3f38b81e 100644 (file)
@@ -80,7 +80,7 @@ class AsyncServerSocket : public DelayedDestruction
      *                    for closing it when done.  The newly accepted file
      *                    descriptor will have already been put into
      *                    non-blocking mode.
-     * @param clientAddr  A reference to a TSocketAddress struct containing the
+     * @param clientAddr  A reference to a SocketAddress struct containing the
      *                    client's address.  This struct is only guaranteed to
      *                    remain valid until connectionAccepted() returns.
      */