From 64cdea5a07ce32fc163ff50b43fece8be284cdc6 Mon Sep 17 00:00:00 2001 From: tanjunchen <2799194073@qq.com> Date: Wed, 2 Oct 2019 09:48:16 +0800 Subject: [PATCH] fix some spelling mistakes in document --- include/grpc/impl/codegen/port_platform.h | 2 +- .../resolver/dns/c_ares/grpc_ares_ev_driver_windows.cc | 4 ++-- src/core/tsi/ssl_transport_security.cc | 5 +++-- src/core/tsi/ssl_transport_security.h | 4 ++-- src/cpp/thread_manager/thread_manager.h | 2 +- src/csharp/Grpc.Core/Internal/CallSafeHandle.cs | 2 +- src/csharp/Grpc.Core/Internal/DefaultObjectPool.cs | 2 +- src/objective-c/RxLibrary/GRXWriteable.h | 2 +- src/php/composer.json | 2 +- src/php/lib/Grpc/BidiStreamingCall.php | 2 +- src/python/grpcio/grpc/_cython/_cygrpc/aio/call.pyx.pxi | 2 +- src/python/grpcio/grpc/_cython/_cygrpc/grpc_string.pyx.pxi | 2 +- src/python/grpcio_tests/tests/qps/benchmark_client.py | 2 +- src/ruby/end2end/channel_closing_driver.rb | 2 +- src/ruby/ext/grpc/rb_call.c | 2 +- src/ruby/lib/grpc/generic/bidi_call.rb | 2 +- src/ruby/lib/grpc/generic/rpc_server.rb | 2 +- src/ruby/spec/google_rpc_status_utils_spec.rb | 4 ++-- templates/Makefile.template | 2 +- templates/src/php/composer.json.template | 2 +- test/core/memory_usage/client.cc | 2 +- 21 files changed, 26 insertions(+), 25 deletions(-) diff --git a/include/grpc/impl/codegen/port_platform.h b/include/grpc/impl/codegen/port_platform.h index d1767ab0b7..a757f37448 100644 --- a/include/grpc/impl/codegen/port_platform.h +++ b/include/grpc/impl/codegen/port_platform.h @@ -225,7 +225,7 @@ #define GPR_CPU_IPHONE 1 #define GPR_PTHREAD_TLS 1 #define GRPC_CFSTREAM 1 -/* the c-ares resolver isnt safe to enable on iOS */ +/* the c-ares resolver isn't safe to enable on iOS */ #define GRPC_ARES 0 #else /* TARGET_OS_IPHONE */ #define GPR_PLATFORM_STRING "osx" diff --git a/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_windows.cc b/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_windows.cc index bc79b7c364..cc49d0a9f7 100644 --- a/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_windows.cc +++ b/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_windows.cc @@ -399,8 +399,8 @@ class GrpcPolledFdWindows { ares_ssize_t SendVTCP(WSAErrorContext* wsa_error_ctx, const struct iovec* iov, int iov_count) { // The "sendv" handler on TCP sockets buffers up write - // requests and returns an artifical WSAEWOULDBLOCK. Writing that buffer out - // in the background, and making further send progress in general, will + // requests and returns an artificial WSAEWOULDBLOCK. Writing that buffer + // out in the background, and making further send progress in general, will // happen as long as c-ares continues to show interest in writeability on // this fd. GRPC_CARES_TRACE_LOG("fd:|%s| SendVTCP called tcp_write_state_:%d", diff --git a/src/core/tsi/ssl_transport_security.cc b/src/core/tsi/ssl_transport_security.cc index 32a96b23f2..a5b4a55bad 100644 --- a/src/core/tsi/ssl_transport_security.cc +++ b/src/core/tsi/ssl_transport_security.cc @@ -550,7 +550,8 @@ static tsi_result ssl_ctx_use_certificate_chain(SSL_CTX* context, break; } /* We don't need to free certificate_authority as its ownership has been - transfered to the context. That is not the case for certificate though. + transferred to the context. That is not the case for certificate + though. */ } } while (0); @@ -1618,7 +1619,7 @@ static int server_handshaker_factory_new_session_callback( return 0; } factory->session_cache->Put(server_name, tsi::SslSessionPtr(session)); - // Return 1 to indicate transfered ownership over the given session. + // Return 1 to indicate transferred ownership over the given session. return 1; } diff --git a/src/core/tsi/ssl_transport_security.h b/src/core/tsi/ssl_transport_security.h index 04f038ac3b..dba711088a 100644 --- a/src/core/tsi/ssl_transport_security.h +++ b/src/core/tsi/ssl_transport_security.h @@ -260,8 +260,8 @@ struct tsi_ssl_server_handshaker_options { specified. If this parameter is 0, the other alpn parameters must be NULL. */ uint16_t num_alpn_protocols; - /* session_ticket_key is optional key for encrypting session keys. If paramter - is not specified it must be NULL. */ + /* session_ticket_key is optional key for encrypting session keys. If + parameter is not specified it must be NULL. */ const char* session_ticket_key; /* session_ticket_key_size is a size of session ticket encryption key. */ size_t session_ticket_key_size; diff --git a/src/cpp/thread_manager/thread_manager.h b/src/cpp/thread_manager/thread_manager.h index 62b1beebc3..4c1b3aad2b 100644 --- a/src/cpp/thread_manager/thread_manager.h +++ b/src/cpp/thread_manager/thread_manager.h @@ -150,7 +150,7 @@ class ThreadManager { // // Note: The user of this ThreadManager object must create grpc_resource_quota // object (that contains the actual max thread quota) and a grpc_resource_user - // object through which quota is requested whenver new threads need to be + // object through which quota is requested whenever new threads need to be // created grpc_resource_user* resource_user_; diff --git a/src/csharp/Grpc.Core/Internal/CallSafeHandle.cs b/src/csharp/Grpc.Core/Internal/CallSafeHandle.cs index 7fadc1d8b4..f5ee50befa 100644 --- a/src/csharp/Grpc.Core/Internal/CallSafeHandle.cs +++ b/src/csharp/Grpc.Core/Internal/CallSafeHandle.cs @@ -33,7 +33,7 @@ namespace Grpc.Core.Internal public static readonly CallSafeHandle NullInstance = new CallSafeHandle(); static readonly NativeMethods Native = NativeMethods.Get(); - // Completion handlers are pre-allocated to avoid unneccessary delegate allocations. + // Completion handlers are pre-allocated to avoid unnecessary delegate allocations. // The "state" field is used to store the actual callback to invoke. static readonly BatchCompletionDelegate CompletionHandler_IUnaryResponseClientCallback = (success, context, state) => ((IUnaryResponseClientCallback)state).OnUnaryResponseClient(success, context.GetReceivedStatusOnClient(), context.GetReceivedMessageReader(), context.GetReceivedInitialMetadata()); diff --git a/src/csharp/Grpc.Core/Internal/DefaultObjectPool.cs b/src/csharp/Grpc.Core/Internal/DefaultObjectPool.cs index 0e1dc4d158..e98e9caef7 100644 --- a/src/csharp/Grpc.Core/Internal/DefaultObjectPool.cs +++ b/src/csharp/Grpc.Core/Internal/DefaultObjectPool.cs @@ -161,7 +161,7 @@ namespace Grpc.Core.Internal } } - // If the shared pool could not accomodate all returnLimit items, + // If the shared pool could not accommodate all returnLimit items, // next time we try to return we will just dispose the item // instead of trying to return them to the shared queue. // This is to guarantee we won't be accessing the shared queue too often. diff --git a/src/objective-c/RxLibrary/GRXWriteable.h b/src/objective-c/RxLibrary/GRXWriteable.h index 71b5979c69..05c2c3a425 100644 --- a/src/objective-c/RxLibrary/GRXWriteable.h +++ b/src/objective-c/RxLibrary/GRXWriteable.h @@ -28,7 +28,7 @@ - (void)writeValue:(id)value; /** - * Signal that the sequence is completed, or that an error ocurred. After this + * Signal that the sequence is completed, or that an error occurred. After this * message is sent to the instance, neither it nor writeValue: may be * called again. */ diff --git a/src/php/composer.json b/src/php/composer.json index f4af57682a..769f2285ed 100644 --- a/src/php/composer.json +++ b/src/php/composer.json @@ -1,6 +1,6 @@ { "name": "grpc/grpc-dev", - "description": "gRPC library for PHP - for Developement use only", + "description": "gRPC library for PHP - for Development use only", "license": "Apache-2.0", "version": "1.25.0", "require": { diff --git a/src/php/lib/Grpc/BidiStreamingCall.php b/src/php/lib/Grpc/BidiStreamingCall.php index 2c0aa9f8d9..be79c5defe 100644 --- a/src/php/lib/Grpc/BidiStreamingCall.php +++ b/src/php/lib/Grpc/BidiStreamingCall.php @@ -20,7 +20,7 @@ namespace Grpc; /** - * Represents an active call that allows for sending and recieving messages + * Represents an active call that allows for sending and receiving messages * in streams in any order. */ class BidiStreamingCall extends AbstractCall diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/aio/call.pyx.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/aio/call.pyx.pxi index 9530a47f38..d67d24fcb0 100644 --- a/src/python/grpcio/grpc/_cython/_cygrpc/aio/call.pyx.pxi +++ b/src/python/grpcio/grpc/_cython/_cygrpc/aio/call.pyx.pxi @@ -55,7 +55,7 @@ cdef class _AioCall: assert call._waiter_call if succeed == 0: - call._waiter_call.set_exception(Exception("Some error ocurred")) + call._waiter_call.set_exception(Exception("Some error occurred")) else: call._waiter_call.set_result(None) diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/grpc_string.pyx.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/grpc_string.pyx.pxi index 00a1b23a67..9621f9b59a 100644 --- a/src/python/grpcio/grpc/_cython/_cygrpc/grpc_string.pyx.pxi +++ b/src/python/grpcio/grpc/_cython/_cygrpc/grpc_string.pyx.pxi @@ -16,7 +16,7 @@ import logging _LOGGER = logging.getLogger(__name__) -# This function will ascii encode unicode string inputs if neccesary. +# This function will ascii encode unicode string inputs if necessary. # In Python3, unicode strings are the default str type. cdef bytes str_to_bytes(object s): if s is None or isinstance(s, bytes): diff --git a/src/python/grpcio_tests/tests/qps/benchmark_client.py b/src/python/grpcio_tests/tests/qps/benchmark_client.py index fac0e44e5a..78d3d60efa 100644 --- a/src/python/grpcio_tests/tests/qps/benchmark_client.py +++ b/src/python/grpcio_tests/tests/qps/benchmark_client.py @@ -102,7 +102,7 @@ class UnarySyncBenchmarkClient(BenchmarkClient): max_workers=config.outstanding_rpcs_per_channel) def send_request(self): - # Send requests in seperate threads to support multiple outstanding rpcs + # Send requests in separate threads to support multiple outstanding rpcs # (See src/proto/grpc/testing/control.proto) self._pool.submit(self._dispatch_request) diff --git a/src/ruby/end2end/channel_closing_driver.rb b/src/ruby/end2end/channel_closing_driver.rb index 57544b0398..8b91b93362 100755 --- a/src/ruby/end2end/channel_closing_driver.rb +++ b/src/ruby/end2end/channel_closing_driver.rb @@ -15,7 +15,7 @@ # limitations under the License. # make sure that the client doesn't hang when channel is closed -# explictly while it's used +# explicitly while it's used require_relative './end2end_common' diff --git a/src/ruby/ext/grpc/rb_call.c b/src/ruby/ext/grpc/rb_call.c index fc641dae80..b8d7025eac 100644 --- a/src/ruby/ext/grpc/rb_call.c +++ b/src/ruby/ext/grpc/rb_call.c @@ -170,7 +170,7 @@ static VALUE grpc_rb_call_cancel(VALUE self) { /* TODO: expose this as part of the surface API if needed. * This is meant for internal usage by the "write thread" of grpc-ruby * client-side bidi calls. It provides a way for the background write-thread - * to propogate failures to the main read-thread and give the user an error + * to propagate failures to the main read-thread and give the user an error * message. */ static VALUE grpc_rb_call_cancel_with_status(VALUE self, VALUE status_code, VALUE details) { diff --git a/src/ruby/lib/grpc/generic/bidi_call.rb b/src/ruby/lib/grpc/generic/bidi_call.rb index a4d4af65ef..cd32f3dac4 100644 --- a/src/ruby/lib/grpc/generic/bidi_call.rb +++ b/src/ruby/lib/grpc/generic/bidi_call.rb @@ -17,7 +17,7 @@ require_relative '../grpc' # GRPC contains the General RPC module. module GRPC - # The BiDiCall class orchestrates exection of a BiDi stream on a client or + # The BiDiCall class orchestrates execution of a BiDi stream on a client or # server. class BidiCall include Core::CallOps diff --git a/src/ruby/lib/grpc/generic/rpc_server.rb b/src/ruby/lib/grpc/generic/rpc_server.rb index a566afa0bc..2914d0f849 100644 --- a/src/ruby/lib/grpc/generic/rpc_server.rb +++ b/src/ruby/lib/grpc/generic/rpc_server.rb @@ -241,7 +241,7 @@ module GRPC # server's current call loop is it's last. def stop # if called via run_till_terminated_or_interrupted, - # signal stop_server_thread and dont do anything + # signal stop_server_thread and don't do anything if @stop_server.nil? == false && @stop_server == false @stop_server = true @stop_server_cv.broadcast diff --git a/src/ruby/spec/google_rpc_status_utils_spec.rb b/src/ruby/spec/google_rpc_status_utils_spec.rb index 740c3794b6..861ddb07c2 100644 --- a/src/ruby/spec/google_rpc_status_utils_spec.rb +++ b/src/ruby/spec/google_rpc_status_utils_spec.rb @@ -67,7 +67,7 @@ describe 'conversion from a status struct to a google protobuf status' do expect(rpc_status).to eq(proto) end - it 'can succesfully convert a status struct into a google protobuf status '\ + it 'can successfully convert a status struct into a google protobuf status '\ 'when there are no rpcstatus details' do proto = Google::Rpc::Status.new(code: 1, message: 'matching message') encoded_proto = Google::Rpc::Status.encode(proto) @@ -79,7 +79,7 @@ describe 'conversion from a status struct to a google protobuf status' do expect(out.details).to eq([]) end - it 'can succesfully convert a status struct into a google protobuf '\ + it 'can successfully convert a status struct into a google protobuf '\ 'status when there are multiple rpcstatus details' do simple_request_any = Google::Protobuf::Any.new simple_request = Grpc::Testing::SimpleRequest.new( diff --git a/templates/Makefile.template b/templates/Makefile.template index bd8874c815..4d95935eb2 100644 --- a/templates/Makefile.template +++ b/templates/Makefile.template @@ -35,7 +35,7 @@ sources_that_need_openssl = set() sources_that_don_t_need_openssl = set() - # warnings we'd like, but that dont exist in all compilers + # warnings we'd like, but that don't exist in all compilers PREFERRED_WARNINGS=['extra-semi'] CHECK_WARNINGS=PREFERRED_WARNINGS + ['no-shift-negative-value', 'no-unused-but-set-variable', 'no-maybe-uninitialized', 'no-unknown-warning-option'] diff --git a/templates/src/php/composer.json.template b/templates/src/php/composer.json.template index 3793634a2f..9a1c578904 100644 --- a/templates/src/php/composer.json.template +++ b/templates/src/php/composer.json.template @@ -2,7 +2,7 @@ --- | { "name": "grpc/grpc-dev", - "description": "gRPC library for PHP - for Developement use only", + "description": "gRPC library for PHP - for Development use only", "license": "Apache-2.0", "version": "${settings.php_version.php_composer()}", "require": { diff --git a/test/core/memory_usage/client.cc b/test/core/memory_usage/client.cc index 097288c5ef..0d7c85009c 100644 --- a/test/core/memory_usage/client.cc +++ b/test/core/memory_usage/client.cc @@ -49,7 +49,7 @@ typedef struct { grpc_metadata_array trailing_metadata_recv; } fling_call; -// Statically allocate call data structs. Enough to accomodate 10000 ping-pong +// Statically allocate call data structs. Enough to accommodate 10000 ping-pong // calls and 1 extra for the snapshot calls. static fling_call calls[10001]; -- GitLab