Rework for git.tesses.org, GC* is std::shared_ptr maybe will fix crash during exit
This commit is contained in:
@@ -15,7 +15,8 @@ static bool Download(Tesses::Framework::Filesystem::VFSPath filename,std::shared
|
||||
if(inContainer && (*inContainer=="1" || *inContainer=="y" || *inContainer=="Y"))
|
||||
{
|
||||
HttpRequest req;
|
||||
req.url = "https://downloads.tesses.net/ShellPackage.crvm";
|
||||
req.followRedirects=true;
|
||||
req.url = "https://redirect.tesses.net/crosslang-shell";
|
||||
req.method = "GET";
|
||||
HttpResponse resp(req);
|
||||
if(resp.statusCode == StatusCode::OK)
|
||||
@@ -34,13 +35,14 @@ static bool Download(Tesses::Framework::Filesystem::VFSPath filename,std::shared
|
||||
|
||||
while(true)
|
||||
{
|
||||
std::cout << "File " << filename.ToString() << " not found, do you want to download the installer from: https://downloads.tesses.net/ShellPackage.crvm (this may install other stuff as well) (Y/n)? ";
|
||||
std::cout << "File " << filename.ToString() << " not found, do you want to download the installer from: https://redirect.tesses.net/crosslang-shell (this may install other stuff as well) (Y/n)? ";
|
||||
std::string line;
|
||||
std::getline(std::cin,line);
|
||||
if(line == "Y" || line == "y")
|
||||
{
|
||||
HttpRequest req;
|
||||
req.url = "https://downloads.tesses.net/ShellPackage.crvm";
|
||||
req.followRedirects = true;
|
||||
req.url = "https://redirect.tesses.net/crosslang-shell";
|
||||
req.method = "GET";
|
||||
HttpResponse resp(req);
|
||||
if(resp.statusCode == StatusCode::OK)
|
||||
@@ -89,7 +91,8 @@ TObject CrossLangShell(GCList& ls, std::vector<std::string>& argv)
|
||||
|
||||
auto subdir = std::make_shared<Tesses::Framework::Filesystem::SubdirFilesystem>(Tesses::Framework::Filesystem::LocalFS,dir);
|
||||
HttpRequest req;
|
||||
req.url = "https://downloads.tesses.net/ShellPackage.crvm";
|
||||
req.followRedirects=true;
|
||||
req.url = "https://redirect.tesses.net/crosslang-shell";
|
||||
req.method = "GET";
|
||||
HttpResponse resp(req);
|
||||
if(resp.statusCode == StatusCode::OK)
|
||||
|
||||
@@ -212,15 +212,15 @@ void CrossLangCompiler(std::vector<std::string>& argv)
|
||||
|
||||
}
|
||||
|
||||
GC* gc=nullptr;
|
||||
GCList* ls=nullptr;
|
||||
std::shared_ptr<GC> gc;
|
||||
std::shared_ptr<GCList> ls;
|
||||
TRootEnvironment* env=nullptr;
|
||||
if(comptime != "none")
|
||||
{
|
||||
gc = new GC();
|
||||
std::shared_ptr<GC> gc= std::make_shared<GC>();
|
||||
gc->Start();
|
||||
ls = new GCList(gc);
|
||||
env = TRootEnvironment::Create(ls,TDictionary::Create(ls));
|
||||
ls = std::make_shared<GCList>(gc);
|
||||
env = TRootEnvironment::Create(*ls,TDictionary::Create(*ls));
|
||||
|
||||
if(comptime == "secure")
|
||||
{
|
||||
@@ -281,10 +281,5 @@ void CrossLangCompiler(std::vector<std::string>& argv)
|
||||
|
||||
gen.Save(strm);
|
||||
}
|
||||
if(gc != nullptr)
|
||||
{
|
||||
delete ls;
|
||||
delete gc;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -9,7 +9,7 @@ using namespace Tesses::Framework::Filesystem;
|
||||
namespace Tesses::CrossLang::Programs {
|
||||
TObject CrossLangInterperter(GCList& ls,TRootEnvironment* env,std::vector<std::string>& argv)
|
||||
{
|
||||
GC* gc = ls.GetGC();
|
||||
std::shared_ptr<GC> gc = ls.GetGC();
|
||||
if(argv.size() > 1)
|
||||
{
|
||||
std::ifstream strm(argv[1],std::ios_base::in|std::ios_base::binary);
|
||||
|
||||
Reference in New Issue
Block a user