aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJie Luo <anandolee@gmail.com>2018-02-07 11:14:19 -0800
committerGitHub <noreply@github.com>2018-02-07 11:14:19 -0800
commit2bb3b2472509e0ba7bc7614050ac354078767b95 (patch)
tree16efafb92448ddccb9e816be574e7f7b6585f348
parent42ebb4fe80d4d14cb6c171e552b1fd341e4f645c (diff)
downloadprotobuf-2bb3b2472509e0ba7bc7614050ac354078767b95.tar.gz
protobuf-2bb3b2472509e0ba7bc7614050ac354078767b95.tar.bz2
protobuf-2bb3b2472509e0ba7bc7614050ac354078767b95.zip
Update descriptor.cc
-rw-r--r--python/google/protobuf/pyext/descriptor.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/python/google/protobuf/pyext/descriptor.cc b/python/google/protobuf/pyext/descriptor.cc
index 9fb2ade1..036be3b2 100644
--- a/python/google/protobuf/pyext/descriptor.cc
+++ b/python/google/protobuf/pyext/descriptor.cc
@@ -115,7 +115,7 @@ bool _CalledFromGeneratedFile(int stacklevel) {
}
if ((filename_size < 3) || (strcmp(&filename[filename_size - 3], ".py") != 0)) {
- // Cython is not using .py file and not at global module scope.
+ // Cython's stack does not have .py file name and is not at global module scope.
return true;
}
@@ -123,7 +123,6 @@ bool _CalledFromGeneratedFile(int stacklevel) {
// filename is too short.
return false;
}
-
if (strcmp(&filename[filename_size - 7], "_pb2.py") != 0) {
// Filename is not ending with _pb2.
return false;