forked from OctaForge/libostd
vtable translation unit for thread pool + warns
parent
1f5e7dc193
commit
375c014f7a
1
build.cc
1
build.cc
|
@ -28,6 +28,7 @@ namespace fs = ostd::filesystem;
|
||||||
#include "src/io.cc"
|
#include "src/io.cc"
|
||||||
#include "src/process.cc"
|
#include "src/process.cc"
|
||||||
#include "src/filesystem.cc"
|
#include "src/filesystem.cc"
|
||||||
|
#include "src/thread_pool.cc"
|
||||||
#include "src/channel.cc"
|
#include "src/channel.cc"
|
||||||
#include "src/string.cc"
|
#include "src/string.cc"
|
||||||
#include "src/argparse.cc"
|
#include "src/argparse.cc"
|
||||||
|
|
|
@ -31,7 +31,7 @@ inline code_t hex_to_code(string_range hs) {
|
||||||
if (!std::isxdigit(c |= 32)) {
|
if (!std::isxdigit(c |= 32)) {
|
||||||
throw std::runtime_error{"malformed code point"};
|
throw std::runtime_error{"malformed code point"};
|
||||||
}
|
}
|
||||||
ret = ret * 16 + (c - ((c > '9') ? ('a' - 10) : '0'));
|
ret = ret * 16 + code_t(c - ((c > '9') ? ('a' - 10) : '0'));
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -62,7 +62,7 @@ struct parse_state {
|
||||||
bits[n] = line;
|
bits[n] = line;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
bits[n++] = line.slice(0, sc.data() - line.data());
|
bits[n++] = line.slice(0, std::size_t(sc.data() - line.data()));
|
||||||
sc.pop_front();
|
sc.pop_front();
|
||||||
line = sc;
|
line = sc;
|
||||||
}
|
}
|
||||||
|
@ -145,8 +145,8 @@ struct parse_state {
|
||||||
](std::size_t i, std::size_t offs) {
|
](std::size_t i, std::size_t offs) {
|
||||||
int off = (!int(offs) * 2) - 1;
|
int off = (!int(offs) * 2) - 1;
|
||||||
return match_pair(i, 2) && (cases.empty() || (
|
return match_pair(i, 2) && (cases.empty() || (
|
||||||
(cases[i + 1] == (codes[i + 1] + off)) &&
|
(cases[i + 1] == code_t(std::int32_t(codes[i + 1]) + off)) &&
|
||||||
(cases[i ] == (codes[i ] + off))
|
(cases[i ] == code_t(std::int32_t(codes[i ]) + off))
|
||||||
));
|
));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -209,6 +209,9 @@
|
||||||
# endif
|
# endif
|
||||||
# define OSTD_LOCAL
|
# define OSTD_LOCAL
|
||||||
#else
|
#else
|
||||||
|
# if defined(OSTD_BUILD_LIB) || defined(OSTD_BUILD_DLL)
|
||||||
|
/* -Wunused-macros */
|
||||||
|
# endif
|
||||||
# if __GNUC__ >= 4
|
# if __GNUC__ >= 4
|
||||||
# define OSTD_EXPORT __attribute__((visibility("default")))
|
# define OSTD_EXPORT __attribute__((visibility("default")))
|
||||||
# define OSTD_LOCAL __attribute__((visibility("hidden")))
|
# define OSTD_LOCAL __attribute__((visibility("hidden")))
|
||||||
|
|
|
@ -36,7 +36,7 @@ namespace ostd {
|
||||||
namespace detail {
|
namespace detail {
|
||||||
struct tpool_func_base {
|
struct tpool_func_base {
|
||||||
tpool_func_base() {}
|
tpool_func_base() {}
|
||||||
virtual ~tpool_func_base() {}
|
virtual ~tpool_func_base();
|
||||||
virtual void clone(tpool_func_base *func) = 0;
|
virtual void clone(tpool_func_base *func) = 0;
|
||||||
virtual void call() = 0;
|
virtual void call() = 0;
|
||||||
};
|
};
|
||||||
|
|
|
@ -0,0 +1,16 @@
|
||||||
|
/* Thread pool implementation bits.
|
||||||
|
*
|
||||||
|
* This file is part of libostd. See COPYING.md for futher information.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "ostd/thread_pool.hh"
|
||||||
|
#include "ostd/channel.hh"
|
||||||
|
|
||||||
|
namespace ostd {
|
||||||
|
namespace detail {
|
||||||
|
|
||||||
|
/* place the vtable here */
|
||||||
|
tpool_func_base::~tpool_func_base() {}
|
||||||
|
|
||||||
|
} /* namespace detail */
|
||||||
|
} /* namespace ostd */
|
Loading…
Reference in New Issue