|
33 | 33 | * ENHANCEMENTS, OR MODIFICATIONS.
|
34 | 34 | *
|
35 | 35 | * IDENTIFICATION
|
36 |
| - * $Header: /cvsroot/pgsql/src/pl/plperl/plperl.c,v 1.12 2000/07/05 23:11:55 tgl Exp $ |
| 36 | + * $Header: /cvsroot/pgsql/src/pl/plperl/plperl.c,v 1.13 2000/09/12 04:28:30 momjian Exp $ |
37 | 37 | *
|
38 | 38 | **********************************************************************/
|
39 | 39 |
|
@@ -324,13 +324,13 @@ plperl_create_sub(char * s)
|
324 | 324 | count = perl_call_pv("mksafefunc", G_SCALAR | G_EVAL | G_KEEPERR);
|
325 | 325 | SPAGAIN;
|
326 | 326 |
|
327 |
| - if (SvTRUE(GvSV(errgv))) |
| 327 | + if (SvTRUE(ERRSV)) |
328 | 328 | {
|
329 | 329 | POPs;
|
330 | 330 | PUTBACK;
|
331 | 331 | FREETMPS;
|
332 | 332 | LEAVE;
|
333 |
| - elog(ERROR, "creation of function failed : %s", SvPV(GvSV(errgv), na)); |
| 333 | + elog(ERROR, "creation of function failed : %s", SvPV_nolen(ERRSV)); |
334 | 334 | }
|
335 | 335 |
|
336 | 336 | if (count != 1) {
|
@@ -449,13 +449,13 @@ plperl_call_perl_func(plperl_proc_desc * desc, FunctionCallInfo fcinfo)
|
449 | 449 | elog(ERROR, "plperl : didn't get a return item from function");
|
450 | 450 | }
|
451 | 451 |
|
452 |
| - if (SvTRUE(GvSV(errgv))) |
| 452 | + if (SvTRUE(ERRSV)) |
453 | 453 | {
|
454 | 454 | POPs;
|
455 | 455 | PUTBACK;
|
456 | 456 | FREETMPS;
|
457 | 457 | LEAVE;
|
458 |
| - elog(ERROR, "plperl : error from function : %s", SvPV(GvSV(errgv), na)); |
| 458 | + elog(ERROR, "plperl : error from function : %s", SvPV_nolen(ERRSV)); |
459 | 459 | }
|
460 | 460 |
|
461 | 461 | retval = newSVsv(POPs);
|
@@ -661,7 +661,7 @@ plperl_func_handler(PG_FUNCTION_ARGS)
|
661 | 661 | else
|
662 | 662 | {
|
663 | 663 | retval = FunctionCall3(&prodesc->result_in_func,
|
664 |
| - PointerGetDatum(SvPV(perlret, na)), |
| 664 | + PointerGetDatum(SvPV_nolen(perlret)), |
665 | 665 | ObjectIdGetDatum(prodesc->result_in_elem),
|
666 | 666 | Int32GetDatum(prodesc->result_in_len));
|
667 | 667 | }
|
@@ -2184,6 +2184,6 @@ plperl_build_tuple_argument(HeapTuple tuple, TupleDesc tupdesc)
|
2184 | 2184 | sv_catpvf(output, "'%s' => undef,", attname);
|
2185 | 2185 | }
|
2186 | 2186 | sv_catpv(output, "}");
|
2187 |
| - output = perl_eval_pv(SvPV(output, na), TRUE); |
| 2187 | + output = perl_eval_pv(SvPV_nolen(output), TRUE); |
2188 | 2188 | return output;
|
2189 | 2189 | }
|
0 commit comments