last for now

This commit is contained in:
Alexandra Latysheva 2020-10-01 17:11:28 +00:00
parent fea40e017f
commit 6497a40bff
2 changed files with 7 additions and 5 deletions

View File

@ -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

View File

@ -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);
}