Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
flatbuffers
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
flatbuffers
Commits
99c1ddc7
Commit
99c1ddc7
authored
May 19, 2016
by
Wouter van Oortmerssen
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://github.com/google/flatbuffers
parents
69eef0a0
42bd6447
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
6 deletions
+8
-6
CppUsage.md
docs/source/CppUsage.md
+1
-2
builder.py
python/flatbuffers/builder.py
+1
-1
compat.py
python/flatbuffers/compat.py
+6
-3
No files found.
docs/source/CppUsage.md
View file @
99c1ddc7
...
@@ -26,8 +26,7 @@ your program by including the header. As noted, this header relies on
...
@@ -26,8 +26,7 @@ your program by including the header. As noted, this header relies on
The code for the FlatBuffers C++ library can be found at
The code for the FlatBuffers C++ library can be found at
`flatbuffers/include/flatbuffers`
. You can browse the library code on the
`flatbuffers/include/flatbuffers`
. You can browse the library code on the
[
FlatBuffers GitHub page
](
https://github.com/google/flatbuffers/tree/master/
[
FlatBuffers GitHub page
](
https://github.com/google/flatbuffers/tree/master/include/flatbuffers
)
.
include/flatbuffers).
## Testing the FlatBuffers C++ library
## Testing the FlatBuffers C++ library
...
...
python/flatbuffers/builder.py
View file @
99c1ddc7
...
@@ -401,7 +401,7 @@ class Builder(object):
...
@@ -401,7 +401,7 @@ class Builder(object):
if
isinstance
(
s
,
compat
.
string_types
):
if
isinstance
(
s
,
compat
.
string_types
):
x
=
s
.
encode
(
encoding
,
errors
)
x
=
s
.
encode
(
encoding
,
errors
)
elif
isinstance
(
s
,
compat
.
binary_type
):
elif
isinstance
(
s
,
compat
.
binary_type
s
):
x
=
s
x
=
s
else
:
else
:
raise
TypeError
(
"non-string passed to CreateString"
)
raise
TypeError
(
"non-string passed to CreateString"
)
...
...
python/flatbuffers/compat.py
View file @
99c1ddc7
...
@@ -11,13 +11,16 @@ PY34 = sys.version_info[0:2] >= (3, 4)
...
@@ -11,13 +11,16 @@ PY34 = sys.version_info[0:2] >= (3, 4)
if
PY3
:
if
PY3
:
string_types
=
(
str
,)
string_types
=
(
str
,)
binary_type
=
bytes
binary_type
s
=
(
bytes
,
bytearray
)
range_func
=
range
range_func
=
range
memoryview_type
=
memoryview
memoryview_type
=
memoryview
struct_bool_decl
=
"?"
struct_bool_decl
=
"?"
else
:
else
:
string_types
=
(
basestring
,)
string_types
=
(
unicode
,)
binary_type
=
str
if
PY26
or
PY27
:
binary_types
=
(
str
,
bytearray
)
else
:
binary_types
=
(
str
,)
range_func
=
xrange
range_func
=
xrange
if
PY26
or
(
PY27
and
not
PY275
):
if
PY26
or
(
PY27
and
not
PY275
):
memoryview_type
=
buffer
memoryview_type
=
buffer
...
...
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