* struct information - メンバ変数への const の付加
* extension() - typo の修正
* ~extension() - typo の修正
typedef std::function<void () noexcept> finalize_handler_type;
struct information {
typedef std::function<void () noexcept> finalize_handler_type;
struct information {
- mona_string name;
- vm_type lua_obj;
+ const mona_string name;
+ const vm_type lua_obj;
bool is_packaged;
};
extension() {
bool is_packaged;
};
extension() {
- if(boost::filesystem::exist(path)) {
- boost::filesystem::create_directory(unpacked_extension_path);
+ if(boost::filesystem::exists(unpacked_extension_path)) {
+ boost::filesystem::create_directories(unpacked_extension_path);
}
instance = this;
}
~extension() {
boost::system::error_code dummy;
}
instance = this;
}
~extension() {
boost::system::error_code dummy;
- boost::filesystem::remove_directory(unpacked_extension_path, dummy);
+ boost::filesystem::remove_all(unpacked_extension_path, dummy);
}
static extension *get_instance() { return instance; }
}
static extension *get_instance() { return instance; }
if(ext_path.get_ext() == "gep") {
// エクステンションはパッケージ化されている
if(ext_path.get_ext() == "gep") {
// エクステンションはパッケージ化されている
- information ext_info = {"", luaL_newstate(""), true};
+ information ext_info = {"", luaL_newstate(), true};
extension_table[ext_info.name] = ext_info;
} else if(ext_path.get_ext() == "gex") {
extension_table[ext_info.name] = ext_info;
} else if(ext_path.get_ext() == "gex") {
}
private:
std::unordered_map<extension_id_type, information> extension_table;
}
private:
std::unordered_map<extension_id_type, information> extension_table;
- const boost::filesystem::path unpacked_extension_path = ".tmp.unpacked-ext";
+ const boost::filesystem::path unpacked_extension_path = ".tmp/unpacked-ext";
static self_type *instance;
initialize_handler_type init_func;
static self_type *instance;
initialize_handler_type init_func;