Annotation of loncom/homework/caparesponse/capa.i, revision 1.3
1.1 albertel 1: %module capa
2: %{
3:
4: %}
1.3 ! albertel 5:
! 6: %typemap(perl5,in) char** reterror (char** cvalue) {
! 7: SV* tempsv;
! 8: if (!SvROK($source)) {
! 9: croak("expected a reference\n");
! 10: }
! 11: tempsv = SvRV($source);
! 12: if ((!SvPOK(tempsv))) {
! 13: croak("expected a double reference\n");
! 14: }
! 15: int len;
! 16: char *temp=SvPV(tempsv,len);
! 17: cvalue = &temp;
! 18: $target = cvalue;
! 19: }
! 20:
! 21: %typemap(perl5,argout) char ** reterror {
! 22: SV *tempsv;
! 23: tempsv = SvRV($arg);
! 24: if (($source!=NULL) && (*$source!=NULL)) {
! 25: sv_setpv(tempsv, *$source);
! 26: free(*$source);
! 27: }
! 28: }
1.1 albertel 29: extern int caparesponse_capa_check_answer(char *response,char *correct,
30: int type,int tol_type,double tolerance,
31: int sig_lbound,int sig_ubound,
32: char *ans_fmt, char *unit_str,
1.2 albertel 33: int calc, char *id_list, char *pts_list,
1.3 ! albertel 34: char *rndseed, char** reterror);
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>