Skip to content

Commit

Permalink
Fix return values in PL/ParrotU
Browse files Browse the repository at this point in the history
  • Loading branch information
leto committed May 27, 2010
1 parent 3a96e63 commit 93d4a76
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions plparrot.c
Expand Up @@ -159,9 +159,11 @@ PG_FUNCTION_INFO_V1(plparrotu_call_handler);
static Datum
plparrotu_func_handler(PG_FUNCTION_ARGS)
{
Datum retval;
interp = untrusted_interp;
return plparrot_func_handler(fcinfo);
retval = plparrot_func_handler(fcinfo);
interp = trusted_interp;
return retval;
}

/*
Expand Down Expand Up @@ -309,9 +311,11 @@ plparrot_push_pgdatatype_pmc(Parrot_PMC func_args, FunctionCallInfo fcinfo, int
Datum
plparrotu_call_handler(PG_FUNCTION_ARGS)
{
Datum retval;
interp = untrusted_interp;
plparrot_call_handler(fcinfo);
retval = plparrot_call_handler(fcinfo);
interp = trusted_interp;
return retval;
}

Datum
Expand Down
2 changes: 1 addition & 1 deletion t/sql/test.sql
Expand Up @@ -15,7 +15,7 @@ BEGIN;
\i plparrot.sql

-- Plan the tests.
SELECT plan(31);
SELECT plan(32);

CREATE OR REPLACE FUNCTION create_plparrot()
RETURNS BOOLEAN
Expand Down

0 comments on commit 93d4a76

Please sign in to comment.