From 055104704ea93d85102a68ac9bafd0cd1babfab7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= Date: Thu, 28 Apr 2011 10:41:43 +0200 Subject: [PATCH] Preprocessor: tentative fix for testsuite crash in block/bytecode --- preprocessor/ModFile.cc | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/preprocessor/ModFile.cc b/preprocessor/ModFile.cc index d96eee1f0..5b5c01538 100644 --- a/preprocessor/ModFile.cc +++ b/preprocessor/ModFile.cc @@ -478,15 +478,11 @@ ModFile::writeOutputFiles(const string &basename, bool clear_all, bool console, << "end" << endl; // Erase possible remnants of previous runs - if (block || byte_code || use_dll) - mOutputFile << "if exist('" << basename << "_dynamic.m', 'file')" << endl - << " delete('" << basename << "_dynamic.m');" << endl - << "end" << endl; + string dynfile = basename + "_dynamic.m"; + unlink(dynfile.c_str()); - if (byte_code) - mOutputFile << "if exist('" << basename << "_static.m', 'file')" << endl - << " delete('" << basename << "_static.m');" << endl - << "end" << endl; + string statfile = basename + "_static.m"; + unlink(statfile.c_str()); if (!use_dll) mOutputFile << "erase_compiled_function('" + basename + "_dynamic');" << endl;