#include #include #include #include #include #include #include #include #ifdef __cplusplus extern "C" { #endif #include "EXTERN.h" #include "perl.h" #include "XSUB.h" #ifdef __cplusplus } #endif /* $Id: DCE_Perl.h,v 1.16 1997/06/23 03:45:20 dougm Exp $ */ #ifndef SET_STATUS #define SET_STATUS(stp, val) ((*stp) = val) #endif /* * Not sure this is a good idea, so for now users * must ask for this magic ala 'tie $status => DCE::Status' */ #define STATUS_MAGIC \ if(status != sec_rgy_status_ok) { \ int error_stat; \ unsigned char error_string[dce_c_error_string_len]; \ SV *sv = perl_get_sv("DCE::status",TRUE); \ sv_setnv(sv, (double)status); \ dce_error_inq_text(status, error_string, &error_stat); \ sv_setpv(sv, error_string); \ SvNOK_on(sv); \ } #define DCESTATUS \ XPUSHs_iv(status) #define CHK_STS(n) \ { \ int i; \ if(status > 0) { \ for(i=0; i