Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
F
fuchsia.googlesource.com-third_party-tink
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
fuchsia-mirror
fuchsia.googlesource.com-third_party-tink
Commits
b131429b
Commit
b131429b
authored
5 years ago
by
paulavidas
Committed by
Copybara-Service
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Change return type of Write from Status to StatusOr<int>.
PiperOrigin-RevId: 266746557
parent
648222d2
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
python/cc/BUILD.bazel
+2
-0
2 additions, 0 deletions
python/cc/BUILD.bazel
python/cc/clif/simple_output_stream.clif
+2
-2
2 additions, 2 deletions
python/cc/clif/simple_output_stream.clif
python/cc/simple_output_stream.h
+4
-2
4 additions, 2 deletions
python/cc/simple_output_stream.h
with
8 additions
and
4 deletions
python/cc/BUILD.bazel
+
2
−
0
View file @
b131429b
...
...
@@ -18,8 +18,10 @@ cc_library(
cc_library
(
name
=
"
simple_output_stream
"
,
hdrs
=
[
"
simple_output_stream.h
"
],
include_prefix
=
"
tink/
"
,
deps
=
[
"
//cc/util:status
"
,
"
//cc/util:statusor
"
,
"
@com_google_absl//absl/strings
"
,
],
)
This diff is collapsed.
Click to expand it.
python/cc/clif/simple_output_stream.clif
+
2
−
2
View file @
b131429b
...
...
@@ -10,13 +10,13 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from "tink/python/util/clif.h" import * # Status
from "tink/python/util/clif.h" import * # Status
, StatusOr
from "tink/python/cc/simple_output_stream.h":
namespace `crypto::tink`:
class SimpleOutputStream:
@virtual
def `Write` as write(self, data: bytes) -> Status
def `Write` as write(self, data: bytes) -> Status
Or<int>
@virtual
def `Close` as close(self) -> Status
...
...
This diff is collapsed.
Click to expand it.
python/cc/simple_output_stream.h
+
4
−
2
View file @
b131429b
...
...
@@ -17,6 +17,7 @@
#include
"absl/strings/string_view.h"
#include
"tink/util/status.h"
#include
"tink/util/statusor.h"
namespace
crypto
{
namespace
tink
{
...
...
@@ -25,8 +26,9 @@ namespace tink {
// from Python to C++ via CLIF and vice versa.
class
SimpleOutputStream
{
public:
// Writes 'data' to the underlying stream.
virtual
util
::
Status
Write
(
absl
::
string_view
data
)
=
0
;
// Writes 'data' to the underlying stream and returns the number of bytes
// written, which can be less than the size of 'data'.
virtual
util
::
StatusOr
<
int
>
Write
(
absl
::
string_view
data
)
=
0
;
// Closes the underlying stream.
virtual
util
::
Status
Close
()
=
0
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment