Possible fix for Perl.

Originally committed to SVN as r1997.
This commit is contained in:
Rodrigo Braz Monteiro 2008-03-09 21:00:55 +00:00
parent 825b2f3af0
commit f20fc57d22
3 changed files with 37 additions and 10 deletions

View File

@ -547,6 +547,16 @@ namespace Automation4 {
PERL_SYS_TERM();
}
}
Script* PerlScriptFactory::Produce(const wxString &filename) const
{
if(filename.EndsWith(_T(PERL_SCRIPT_EXTENSION))) {
return new PerlScript(filename);
}
else {
return 0;
}
}
};

View File

@ -252,17 +252,8 @@ namespace Automation4 {
PerlScriptFactory();
~PerlScriptFactory();
virtual Script* Produce(const wxString &filename) const
{
if(filename.EndsWith(_T(PERL_SCRIPT_EXTENSION))) {
return new PerlScript(filename);
}
else {
return 0;
}
}
Script* Produce(const wxString &filename) const;
};
};

View File

@ -87,12 +87,38 @@ void StartupLog(const wxString &msg) {
#define StartupLog(a)
#endif
#ifdef __VISUALC__
#define MS_VC_EXCEPTION 0x406d1388
typedef struct tagTHREADNAME_INFO {
DWORD dwType; // must be 0x1000
LPCSTR szName; // pointer to name (in same addr space)
DWORD dwThreadID; // thread ID (-1 caller thread)
DWORD dwFlags; // reserved for future use, most be zero
} THREADNAME_INFO;
void SetThreadName(DWORD dwThreadID, LPCSTR szThreadName) {
THREADNAME_INFO info;
info.dwType = 0x1000;
info.szName = szThreadName;
info.dwThreadID = dwThreadID;
info.dwFlags = 0;
__try {
RaiseException(MS_VC_EXCEPTION, 0, sizeof(info) / sizeof(DWORD), (DWORD *)&info);
}
__except (EXCEPTION_CONTINUE_EXECUTION) {}
}
#endif
///////////////////////////
// Initialization function
// -----------------------
// Gets called when application starts, creates MainFrame
bool AegisubApp::OnInit() {
#ifdef __VISUALC__
SetThreadName(-1,"AegiMain");
#endif
StartupLog(_T("Inside OnInit"));
frame = NULL;
try {