finished off infastructure of modperl stuff plus adjusted autoconf, makefile, etc

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@265 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
imaginos
2005-05-11 17:24:27 +00:00
parent 7b6fb82d85
commit 64d16904b1
4 changed files with 71 additions and 15 deletions
+5 -10
View File
@@ -121,34 +121,29 @@ XS(XS_AddZNCHook)
{
if ( g_ModPerl )
g_ModPerl->AddZNCHook( (char *)SvPV(ST(0),PL_na) );
PUTBACK;
return;
}
}
EXTERN_C void
xs_init(pTHX)
{
char *file = __FILE__;
newXS( "AddZNCHook", XS_AddZNCHook, file );
}
/////////// supporting functions from within module
bool CModPerl::OnLoad( const CString & sArgs )
{
const char *pArgv[] =
{
"ZNCPerl",
sArgs.c_str(),
sArgs.c_str(),
NULL
};
perl_parse( m_pPerl, xs_init, 2, (char **)pArgv, (char **)NULL );
perl_parse( m_pPerl, NULL, 2, (char **)pArgv, (char **)NULL );
PL_exit_flags |= PERL_EXIT_DESTRUCT_END;
newXS( "AddZNCHook", XS_AddZNCHook, (char *)__FILE__ );
ModPerlInit();
return( true );
}