Author: turnstep
Date: Thu Jan 17 08:47:29 2008
New Revision: 10585

Modified:
   DBD-Pg/trunk/dbdimp.c

Log:
Some people are still running 5.6m unfortunately.


Modified: DBD-Pg/trunk/dbdimp.c
==============================================================================
--- DBD-Pg/trunk/dbdimp.c       (original)
+++ DBD-Pg/trunk/dbdimp.c       Thu Jan 17 08:47:29 2008
@@ -3047,7 +3047,16 @@
                ph_t *currph;
                for (i=0,currph=imp_sth->ph; NULL != currph && i < num_fields; 
currph=currph->nextph,i++) {
                        if (currph->isinout) {
-                               sv_copypv(currph->inout, AvARRAY(av)[i]);
+                               /* When we have Perl 5.7.3 or better as a 
pre-req:
+                                  sv_copypv(currph->inout, AvARRAY(av)[i]);
+                               */
+                               STRLEN len;
+                               const char * const s = 
SvPV_const(AvARRAY(av)[i],len);
+                               sv_setpvn(currph->inout, s, len);
+                               if (SvUTF8(AvARRAY(av)[i]))
+                                       SvUTF8_on(currph->inout);
+                               else
+                                       SvUTF8_off(currph->inout);
                        }
                }
        }

Reply via email to