diff options
author | Jie Luo <anandolee@gmail.com> | 2018-02-07 11:09:56 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-07 11:09:56 -0800 |
commit | 42ebb4fe80d4d14cb6c171e552b1fd341e4f645c (patch) | |
tree | 0ac625394c800dc0e79d5aef684bb870d76e2d66 | |
parent | 568db69246c444c69c884895159ba83fb1e98f9e (diff) | |
download | protobuf-42ebb4fe80d4d14cb6c171e552b1fd341e4f645c.tar.gz protobuf-42ebb4fe80d4d14cb6c171e552b1fd341e4f645c.tar.bz2 protobuf-42ebb4fe80d4d14cb6c171e552b1fd341e4f645c.zip |
Update descriptor.cc
-rw-r--r-- | python/google/protobuf/pyext/descriptor.cc | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/python/google/protobuf/pyext/descriptor.cc b/python/google/protobuf/pyext/descriptor.cc index 12f3df41..9fb2ade1 100644 --- a/python/google/protobuf/pyext/descriptor.cc +++ b/python/google/protobuf/pyext/descriptor.cc @@ -105,7 +105,6 @@ bool _CalledFromGeneratedFile(int stacklevel) { if (frame->f_code->co_filename == NULL) { return false; } - char* filename; Py_ssize_t filename_size; if (PyString_AsStringAndSize(frame->f_code->co_filename, @@ -115,7 +114,7 @@ bool _CalledFromGeneratedFile(int stacklevel) { return false; } - if (filename_size < 3 or strcmp(&filename[filename_size - 3], ".py") != 0) { + if ((filename_size < 3) || (strcmp(&filename[filename_size - 3], ".py") != 0)) { // Cython is not using .py file and not at global module scope. return true; } |