Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
P
protobuf
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
protobuf
Commits
2ad5c0a8
Commit
2ad5c0a8
authored
Sep 08, 2017
by
Feng Xiao
Committed by
GitHub
Sep 08, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2576 from cristicbz/py-strutil
python: do not include internal 'strutil.h' header
parents
054054c1
1ee09c81
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
1 deletion
+11
-1
message.cc
python/google/protobuf/pyext/message.cc
+11
-1
No files found.
python/google/protobuf/pyext/message.cc
View file @
2ad5c0a8
...
...
@@ -67,7 +67,6 @@
#include <google/protobuf/pyext/message_factory.h>
#include <google/protobuf/pyext/safe_numerics.h>
#include <google/protobuf/pyext/scoped_pyobject_ptr.h>
#include <google/protobuf/stubs/strutil.h>
#if PY_MAJOR_VERSION >= 3
#define PyInt_AsLong PyLong_AsLong
...
...
@@ -102,6 +101,17 @@ namespace message_meta {
static
int
InsertEmptyWeakref
(
PyTypeObject
*
base
);
namespace
{
// Copied oveer from internal 'google/protobuf/stubs/strutil.h'.
inline
void
UpperString
(
string
*
s
)
{
string
::
iterator
end
=
s
->
end
();
for
(
string
::
iterator
i
=
s
->
begin
();
i
!=
end
;
++
i
)
{
// toupper() changes based on locale. We don't want this!
if
(
'a'
<=
*
i
&&
*
i
<=
'z'
)
*
i
+=
'A'
-
'a'
;
}
}
}
// Add the number of a field descriptor to the containing message class.
// Equivalent to:
// _cls.<field>_FIELD_NUMBER = <number>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment