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

Side by Side Diff: mojo/public/interfaces/bindings/tests/validation_parser/validation_parser.cc

Issue 2242563002: Add missing <stdlib.h> to validation_parser.cc. (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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "mojo/public/interfaces/bindings/tests/validation_parser/validation_par ser.h" 5 #include "mojo/public/interfaces/bindings/tests/validation_parser/validation_par ser.h"
6 6
7 #include <stdlib.h>
8
7 #include "mojo/public/cpp/bindings/tests/validation_test_input_parser.h" 9 #include "mojo/public/cpp/bindings/tests/validation_test_input_parser.h"
8 10
9 // C interface for the validation test parser. 11 // C interface for the validation test parser.
10 // 12 //
11 // This routine malloc()s return error and space for data which 13 // This routine malloc()s return error and space for data which
12 // must be freed by the caller. Returns a null pointer in *data 14 // must be freed by the caller. Returns a null pointer in *data
13 // and a message in *(return value) on failure. Returns a valid 15 // and a message in *(return value) on failure. Returns a valid
14 // pointer and size in *data and *data_len on success, and a 16 // pointer and size in *data and *data_len on success, and a
15 // null pointer in *(return value). 17 // null pointer in *(return value).
16 extern "C" char* ParseValidationTest(const char* input, // Input 18 extern "C" char* ParseValidationTest(const char* input, // Input
(...skipping 25 matching lines...) Expand all
42 *data_len = cpp_data_size; 44 *data_len = cpp_data_size;
43 // Copy the parsed output into the buffer. 45 // Copy the parsed output into the buffer.
44 memcpy(*data, cpp_data.data(), cpp_data_size); 46 memcpy(*data, cpp_data.data(), cpp_data_size);
45 } else { 47 } else {
46 // If we have no data, set the pointer to null and size to 0. 48 // If we have no data, set the pointer to null and size to 0.
47 *data = nullptr; 49 *data = nullptr;
48 *data_len = 0; 50 *data_len = 0;
49 } 51 }
50 return nullptr; 52 return nullptr;
51 } 53 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698