diff options
author | Daniel Dragan <bulk88@hotmail.com> | 2012-11-03 14:53:55 -0400 |
---|---|---|
committer | Jan Dubois <jand@activestate.com> | 2012-11-08 16:54:56 -0800 |
commit | 94f1727772e0683d79e2101f4dc93ac2ef282c4c (patch) | |
tree | 6e05668762ccdba55a9ba699db3382a1a028fe2a /win32 | |
parent | 9399a70c62d6e4622406f3db44ff4235a362d1a0 (diff) | |
download | perl-94f1727772e0683d79e2101f4dc93ac2ef282c4c.tar.gz |
remove unused dTHXes in /win32/*
Remove dTHXes in win32 perl funcs where they were not used, or could be
replaced with nocontext croaks/warns. Since Perl_get_context is a function
it is not optimized away by the compiler.
Diffstat (limited to 'win32')
-rw-r--r-- | win32/perlhost.h | 10 | ||||
-rw-r--r-- | win32/vmem.h | 3 | ||||
-rw-r--r-- | win32/win32.c | 4 | ||||
-rw-r--r-- | win32/win32sck.c | 1 |
4 files changed, 1 insertions, 17 deletions
diff --git a/win32/perlhost.h b/win32/perlhost.h index 3d72531b24..bd3d1a9fa4 100644 --- a/win32/perlhost.h +++ b/win32/perlhost.h @@ -2176,7 +2176,6 @@ compare(const void *arg1, const void *arg2) void CPerlHost::Add(LPCSTR lpStr) { - dTHX; char szBuffer[1024]; LPSTR *lpPtr; int index, length = strlen(lpStr)+1; @@ -2223,14 +2222,12 @@ CPerlHost::CalculateEnvironmentSpace(void) void CPerlHost::FreeLocalEnvironmentStrings(LPSTR lpStr) { - dTHX; Safefree(lpStr); } char* CPerlHost::GetChildDir(void) { - dTHX; char* ptr; size_t length; @@ -2247,14 +2244,12 @@ CPerlHost::GetChildDir(void) void CPerlHost::FreeChildDir(char* pStr) { - dTHX; Safefree(pStr); } LPSTR CPerlHost::CreateLocalEnvironmentStrings(VDir &vDir) { - dTHX; LPSTR lpStr, lpPtr, lpEnvPtr, lpTmp, lpLocalEnv, lpAllocPtr; DWORD dwSize, dwEnvIndex; int nLength, compVal; @@ -2344,7 +2339,6 @@ CPerlHost::CreateLocalEnvironmentStrings(VDir &vDir) void CPerlHost::Reset(void) { - dTHX; if(m_lppEnvList != NULL) { for(DWORD index = 0; index < m_dwEnvCount; ++index) { Free(m_lppEnvList[index]); @@ -2359,7 +2353,6 @@ CPerlHost::Reset(void) void CPerlHost::Clearenv(void) { - dTHX; char ch; LPSTR lpPtr, lpStr, lpEnvPtr; if (m_lppEnvList != NULL) { @@ -2399,7 +2392,6 @@ CPerlHost::Clearenv(void) char* CPerlHost::Getenv(const char *varname) { - dTHX; if (!m_bTopLevel) { char *pEnv = Find(varname); if (pEnv && *pEnv) @@ -2411,7 +2403,6 @@ CPerlHost::Getenv(const char *varname) int CPerlHost::Putenv(const char *envstring) { - dTHX; Add(envstring); if (m_bTopLevel) return win32_putenv(envstring); @@ -2422,7 +2413,6 @@ CPerlHost::Putenv(const char *envstring) int CPerlHost::Chdir(const char *dirname) { - dTHX; int ret; if (!dirname) { errno = ENOENT; diff --git a/win32/vmem.h b/win32/vmem.h index 4289cee47f..d691635db5 100644 --- a/win32/vmem.h +++ b/win32/vmem.h @@ -197,9 +197,8 @@ void VMem::Free(void* pMem) if (ptr->owner != this) { if (ptr->owner) { #if 1 - dTHX; int *nowhere = NULL; - Perl_warn(aTHX_ "Free to wrong pool %p not %p",this,ptr->owner); + Perl_warn_nocontext("Free to wrong pool %p not %p",this,ptr->owner); *nowhere = 0; /* this segfault is deliberate, so you can see the stack trace */ #else diff --git a/win32/win32.c b/win32/win32.c index 3ae20753ef..f0b2ec0f7f 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -1005,7 +1005,6 @@ win32_rewinddir(DIR *dirp) DllExport int win32_closedir(DIR *dirp) { - dTHX; if (dirp->handle != INVALID_HANDLE_VALUE) FindClose(dirp->handle); Safefree(dirp->start); @@ -2711,7 +2710,6 @@ win32_fopen(const char *filename, const char *mode) DllExport FILE * win32_fdopen(int handle, const char *mode) { - dTHX; FILE *f; f = fdopen(handle, (char *) mode); /* avoid buffering headaches for child processes */ @@ -3328,7 +3326,6 @@ win32_rmdir(const char *dir) DllExport int win32_chdir(const char *dir) { - dTHX; if (!dir) { errno = ENOENT; return -1; @@ -4370,7 +4367,6 @@ Perl_win32_init(int *argcp, char ***argvp) void Perl_win32_term(void) { - dTHX; HINTS_REFCNT_TERM; OP_REFCNT_TERM; PERLIO_TERM; diff --git a/win32/win32sck.c b/win32/win32sck.c index a3160de732..38f66cf39e 100644 --- a/win32/win32sck.c +++ b/win32/win32sck.c @@ -63,7 +63,6 @@ EndSockets(void) void start_sockets(void) { - dTHX; unsigned short version; WSADATA retdata; int ret; |