mirror of
https://github.com/google/sandboxed-api.git
synced 2024-03-22 13:11:30 +08:00
last for now
This commit is contained in:
parent
fea40e017f
commit
6497a40bff
|
@ -43,6 +43,9 @@ add_subdirectory(
|
|||
)
|
||||
|
||||
add_sapi_library(tiff_sapi
|
||||
# List of functions that we want to include in the
|
||||
# generated sandboxed API class
|
||||
|
||||
FUNCTIONS TIFFOpen
|
||||
TIFFClose
|
||||
|
||||
|
@ -105,8 +108,7 @@ add_sapi_library(tiff_sapi
|
|||
|
||||
TIFFCreateEXIFDirectory
|
||||
TIFFWriteCustomDirectory
|
||||
# List of functions that we want to include in the
|
||||
# generated sandboxed API class
|
||||
|
||||
INPUTS wrapper/libtiff/libtiff/tiffio.h
|
||||
wrapper/func.h
|
||||
# Header files or .cc files that should be parsed
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
|
||||
#include "helper.h"
|
||||
|
||||
static auto* g_in_dir = new std::string();
|
||||
static std::string* g_in_dir = nullptr;
|
||||
|
||||
std::string GetImagesDir() {
|
||||
std::string cwd = sandbox2::file_util::fileops::GetCWD();
|
||||
|
@ -30,8 +30,8 @@ std::string GetImagesDir() {
|
|||
}
|
||||
|
||||
std::string GetFilePath(const std::string& filename) {
|
||||
if (g_in_dir->empty()) {
|
||||
*g_in_dir = GetImagesDir();
|
||||
if (!g_in_dir) {
|
||||
g_in_dir = new std::string(GetImagesDir());
|
||||
}
|
||||
return sandbox2::file::JoinPath(*g_in_dir, filename);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user