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
|
add_sapi_library(tiff_sapi
|
||||||
|
# List of functions that we want to include in the
|
||||||
|
# generated sandboxed API class
|
||||||
|
|
||||||
FUNCTIONS TIFFOpen
|
FUNCTIONS TIFFOpen
|
||||||
TIFFClose
|
TIFFClose
|
||||||
|
|
||||||
|
@ -105,8 +108,7 @@ add_sapi_library(tiff_sapi
|
||||||
|
|
||||||
TIFFCreateEXIFDirectory
|
TIFFCreateEXIFDirectory
|
||||||
TIFFWriteCustomDirectory
|
TIFFWriteCustomDirectory
|
||||||
# List of functions that we want to include in the
|
|
||||||
# generated sandboxed API class
|
|
||||||
INPUTS wrapper/libtiff/libtiff/tiffio.h
|
INPUTS wrapper/libtiff/libtiff/tiffio.h
|
||||||
wrapper/func.h
|
wrapper/func.h
|
||||||
# Header files or .cc files that should be parsed
|
# Header files or .cc files that should be parsed
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
|
|
||||||
#include "helper.h"
|
#include "helper.h"
|
||||||
|
|
||||||
static auto* g_in_dir = new std::string();
|
static std::string* g_in_dir = nullptr;
|
||||||
|
|
||||||
std::string GetImagesDir() {
|
std::string GetImagesDir() {
|
||||||
std::string cwd = sandbox2::file_util::fileops::GetCWD();
|
std::string cwd = sandbox2::file_util::fileops::GetCWD();
|
||||||
|
@ -30,8 +30,8 @@ std::string GetImagesDir() {
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string GetFilePath(const std::string& filename) {
|
std::string GetFilePath(const std::string& filename) {
|
||||||
if (g_in_dir->empty()) {
|
if (!g_in_dir) {
|
||||||
*g_in_dir = GetImagesDir();
|
g_in_dir = new std::string(GetImagesDir());
|
||||||
}
|
}
|
||||||
return sandbox2::file::JoinPath(*g_in_dir, filename);
|
return sandbox2::file::JoinPath(*g_in_dir, filename);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user