if ((module_commands = modperl_module_config_table_get(perl, FALSE))) { modperl_svptr_table_destroy(perl, module_commands);
{ dTHXa(perl);  if ((module_commands = modperl_module_config_table_get(aTHX_ FALSE))) { modperl_svptr_table_destroy(aTHX_ module_commands); }
void modperl_perl_destruct(PerlInterpreter *perl){    char **orig_environ = NULL;    PTR_TBL_t *module_commands;     dTHXa(perl);    PERL_SET_CONTEXT(perl);    PL_perl_destruct_level = modperl_perl_destruct_level();#ifdef USE_ENVIRON_ARRAY    /* XXX: otherwise Perl may try to free() environ multiple times     * but it wasn't Perl that modified environ     * at least, not if modperl is doing things right     * this is a bug in Perl.     */#   ifdef WIN32    /*     * PL_origenviron = environ; doesn't work under win32 service.     * we pull a different stunt here that has the same effect of     * tricking perl into _not_ freeing the real 'environ' array.     * instead temporarily swap with a dummy array we malloc     * here which is ok to let perl free.     */    orig_environ = environ;    environ = safemalloc(2 * sizeof(char *));    environ[0] = NULL;#   else    PL_origenviron = environ;#   endif#endif    if (PL_endav) {        modperl_perl_call_list(aTHX_ PL_endav, "END");    }    if ((module_commands = modperl_module_config_table_get(perl, FALSE))) {        modperl_svptr_table_destroy(perl, module_commands);    }    perl_destruct(perl);    /* XXX: big bug in 5.6.1 fixed in 5.7.2+     * XXX: try to find a workaround for 5.6.1     */#if defined(WIN32) && !defined(CLONEf_CLONE_HOST)#   define MP_NO_PERL_FREE#endif#ifndef MP_NO_PERL_FREE    perl_free(perl);#endif#ifdef USE_ENVIRON_ARRAY    if (orig_environ) {        environ = orig_environ;    }#endif}