v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
wrappers.h
Go to the documentation of this file.
1// Copyright 2020 the V8 project authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef V8_BASE_PLATFORM_WRAPPERS_H_
6#define V8_BASE_PLATFORM_WRAPPERS_H_
7
8#include <stddef.h>
9#include <stdio.h>
10#include <stdlib.h>
11
12namespace v8::base {
13
14inline FILE* Fopen(const char* filename, const char* mode) {
15#if V8_OS_STARBOARD
16 return NULL;
17#else
18 return fopen(filename, mode);
19#endif
20}
21
22inline int Fclose(FILE* stream) {
23#if V8_OS_STARBOARD
24 return -1;
25#else
26 return fclose(stream);
27#endif
28}
29
30} // namespace v8::base
31
32#endif // V8_BASE_PLATFORM_WRAPPERS_H_
std::string filename
int Fclose(FILE *stream)
Definition wrappers.h:22
FILE * Fopen(const char *filename, const char *mode)
Definition wrappers.h:14