Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(21)

Unified Diff: mojo/public/c/lib/bindings/buffer.c

Issue 2250183003: Make the fuchsia mojo/public repo the source of truth. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/public/c/lib/bindings/array.c ('k') | mojo/public/c/lib/bindings/map.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/c/lib/bindings/buffer.c
diff --git a/mojo/public/c/lib/bindings/buffer.c b/mojo/public/c/lib/bindings/buffer.c
deleted file mode 100644
index 8a76bec9a0b99bd1a789376e329f25c2f6ee8acc..0000000000000000000000000000000000000000
--- a/mojo/public/c/lib/bindings/buffer.c
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include <mojo/bindings/buffer.h>
-
-#include <assert.h>
-#include <mojo/bindings/internal/util.h>
-#include <stddef.h>
-
-void* MojomBuffer_Allocate(struct MojomBuffer* buf, uint32_t num_bytes) {
- assert(buf);
-
- const uint32_t bytes_used = buf->num_bytes_used;
- const uint64_t size = MOJOM_INTERNAL_ROUND_TO_8((uint64_t)num_bytes);
- if (bytes_used + size > buf->buf_size)
- return NULL;
-
- buf->num_bytes_used += size;
- return buf->buf + bytes_used;
-}
« no previous file with comments | « mojo/public/c/lib/bindings/array.c ('k') | mojo/public/c/lib/bindings/map.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698