plperl-do-whitespace.patch

application/octet-stream

Filename: plperl-do-whitespace.patch
Type: application/octet-stream
Part: 0
Message: Re: plperl and inline functions -- first draft

Patch

Format: unified
File+
doc/src/sgml/plperl.sgml 1 1
src/pl/plperl/plperl.c 25 25
commit 657b5c164c9a20be57e29b1d6b7178a6448ef87f
Author: Brendan Jurd <direvus@gmail.com>
Date:   Sun Nov 15 11:51:28 2009 +1100

    Fix whitespace errors.

diff --git a/doc/src/sgml/plperl.sgml b/doc/src/sgml/plperl.sgml
index d4b2816..cb4c7e4 100644
--- a/doc/src/sgml/plperl.sgml
+++ b/doc/src/sgml/plperl.sgml
@@ -60,7 +60,7 @@ CREATE FUNCTION <replaceable>funcname</replaceable> (<replaceable>argument-types
 $$ LANGUAGE plperl;
 </programlisting>
 
-   PL/Perl also supports inline functions called with the 
+   PL/Perl also supports inline functions called with the
    <xref linkend="sql-do" endterm="sql-do-title">
    statement:
 
diff --git a/src/pl/plperl/plperl.c b/src/pl/plperl/plperl.c
index d9eb4d3..fb94d33 100644
--- a/src/pl/plperl/plperl.c
+++ b/src/pl/plperl/plperl.c
@@ -906,38 +906,38 @@ PG_FUNCTION_INFO_V1(plperl_inline_handler);
 Datum
 plperl_inline_handler(PG_FUNCTION_ARGS)
 {
-	InlineCodeBlock *codeblock = (InlineCodeBlock *)
-	DatumGetPointer(PG_GETARG_DATUM(0)); FunctionCallInfoData fake_fcinfo;
-	FmgrInfo flinfo; plperl_proc_desc desc; plperl_call_data *save_call_data =
-	current_call_data; bool		oldcontext = trusted_context;
-
-    MemSet(&fake_fcinfo, 0, sizeof(fake_fcinfo));                                                            
-    MemSet(&flinfo, 0, sizeof(flinfo));                                                                      
-    MemSet(&desc, 0, sizeof(desc));
-    fake_fcinfo.flinfo = &flinfo;                                                                            
-    flinfo.fn_oid = InvalidOid;                                                                              
-    flinfo.fn_mcxt = CurrentMemoryContext; 
+	InlineCodeBlock *codeblock = (InlineCodeBlock *) DatumGetPointer(PG_GETARG_DATUM(0));
+	FunctionCallInfoData fake_fcinfo;
+	FmgrInfo flinfo;
+	plperl_proc_desc desc;
+	plperl_call_data *save_call_data = current_call_data;
+	bool oldcontext = trusted_context;
 
-    desc.proname = "Do Inline Block";
-    desc.fn_readonly = false;
+	MemSet(&fake_fcinfo, 0, sizeof(fake_fcinfo));
+	MemSet(&flinfo, 0, sizeof(flinfo));
+	MemSet(&desc, 0, sizeof(desc));
+	fake_fcinfo.flinfo = &flinfo;
+	flinfo.fn_oid = InvalidOid;
+	flinfo.fn_mcxt = CurrentMemoryContext;
 
-    desc.lanpltrusted = codeblock->langIsTrusted;
+	desc.proname = "Do Inline Block";
+	desc.fn_readonly = false;
 
-    check_interp(desc.lanpltrusted);
+	desc.lanpltrusted = codeblock->langIsTrusted;
 
+	check_interp(desc.lanpltrusted);
 
-    desc.fn_retistuple = false;
-    desc.fn_retisset = false;
-    desc.fn_retisarray = false;
-    desc.result_oid = VOIDOID;
-    desc.nargs = 0;
+	desc.fn_retistuple = false;
+	desc.fn_retisset = false;
+	desc.fn_retisarray = false;
+	desc.result_oid = VOIDOID;
+	desc.nargs = 0;
 
 	PG_TRY();
 	{
-
-		desc.reference = plperl_create_sub("DO Inline Block", 
-									   codeblock->source_text, 
-									   desc.lanpltrusted);
+		desc.reference = plperl_create_sub("DO Inline Block",
+										   codeblock->source_text,
+										   desc.lanpltrusted);
 
 		plperl_call_perl_func(&desc, &fake_fcinfo);
 	}
@@ -952,7 +952,7 @@ plperl_inline_handler(PG_FUNCTION_ARGS)
 	current_call_data = save_call_data;
 	restore_context(oldcontext);
 
-    PG_RETURN_VOID();
+	PG_RETURN_VOID();
 }
 
 /*