DBD-SQLAnywhere

 view release on metacpan or  search on metacpan

dbdimp.c  view on Meta::CPAN

{
    dTHX;
    DBISTATE_INIT;
//DBIS->debug = 3;
//DBILOGFP = PerlIO_stdout();
}

int
dbd_dr_init( SV *drh )
/********************/
// Called once when each driver object is created and locked so there
// is no concurrent access.
{
    dTHX;
    D_imp_drh( drh );

    imp_drh->sacapi = SACAPI_Alloc();
    if( imp_drh->sacapi == NULL ) {
	return( FALSE );
    }

    DBIc_IMPSET_on( imp_drh );	// imp_drh set up now
    return( TRUE );
}

int
dbd_dr_destroy( SV *drh )
/***********************/
// Called once when each driver object is created and locked so there
// is no concurrent access.
{
    dTHX;
    D_imp_drh( drh );
    if( DBIc_IMPSET( imp_drh ) ) {
	if( imp_drh->sacapi != NULL ) {
	    SACAPI_Release( imp_drh->sacapi );
	}
	DBIc_IMPSET_off( imp_drh );
    }



( run in 0.471 second using v1.01-cache-2.11-cpan-49f99fa48dc )