[LON-CAPA-cvs] cvs: loncom /homework/caparesponse capa.i

albertel lon-capa-cvs@mail.lon-capa.org
Sat, 13 Mar 2004 00:23:27 -0000


albertel		Fri Mar 12 19:23:27 2004 EDT

  Modified files:              
    /loncom/homework/caparesponse	capa.i 
  Log:
  - I think I finally understand the type globs
  
  
Index: loncom/homework/caparesponse/capa.i
diff -u loncom/homework/caparesponse/capa.i:1.3 loncom/homework/caparesponse/capa.i:1.4
--- loncom/homework/caparesponse/capa.i:1.3	Fri Mar 12 16:06:19 2004
+++ loncom/homework/caparesponse/capa.i	Fri Mar 12 19:23:27 2004
@@ -3,7 +3,7 @@
 
 %}
 
-%typemap(perl5,in) char** reterror (char** cvalue) {
+%typemap(perl5,in) char** reterror (char* cvalue) {
   SV* tempsv;
   if (!SvROK($source)) {
     croak("expected a reference\n");
@@ -13,9 +13,8 @@
     croak("expected a double reference\n");
   }
   int len;
-  char *temp=SvPV(tempsv,len);
-  cvalue = &temp;
-  $target = cvalue;
+  cvalue = SvPV(tempsv,len);
+  $target = &cvalue;
 }
 
 %typemap(perl5,argout) char ** reterror {