diff options
author | Bruce Momjian <bruce@momjian.us> | 2012-06-10 15:20:04 -0400 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2012-06-10 15:20:04 -0400 |
commit | 927d61eeff78363ea3938c818d07e511ebaf75cf (patch) | |
tree | 2f0bcecf53327f76272a8ce690fa62505520fab9 /src/pl/plperl | |
parent | 60801944fa105252b48ea5688d47dfc05c695042 (diff) | |
download | postgresql-927d61eeff78363ea3938c818d07e511ebaf75cf.tar.gz postgresql-927d61eeff78363ea3938c818d07e511ebaf75cf.zip |
Run pgindent on 9.2 source tree in preparation for first 9.3
commit-fest.
Diffstat (limited to 'src/pl/plperl')
-rw-r--r-- | src/pl/plperl/plperl.c | 10 | ||||
-rw-r--r-- | src/pl/plperl/plperl_helpers.h | 28 |
2 files changed, 21 insertions, 17 deletions
diff --git a/src/pl/plperl/plperl.c b/src/pl/plperl/plperl.c index 7a92f3d8e28..db584c4e7e4 100644 --- a/src/pl/plperl/plperl.c +++ b/src/pl/plperl/plperl.c @@ -1259,19 +1259,19 @@ plperl_sv_to_datum(SV *sv, Oid typid, int32 typmod, if (!type_is_rowtype(typid)) ereport(ERROR, (errcode(ERRCODE_DATATYPE_MISMATCH), - errmsg("cannot convert Perl hash to non-composite type %s", - format_type_be(typid)))); + errmsg("cannot convert Perl hash to non-composite type %s", + format_type_be(typid)))); td = lookup_rowtype_tupdesc_noerror(typid, typmod, true); if (td == NULL) { /* Try to look it up based on our result type */ if (fcinfo == NULL || - get_call_result_type(fcinfo, NULL, &td) != TYPEFUNC_COMPOSITE) + get_call_result_type(fcinfo, NULL, &td) != TYPEFUNC_COMPOSITE) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("function returning record called in context " - "that cannot accept type record"))); + errmsg("function returning record called in context " + "that cannot accept type record"))); } ret = plperl_hash_to_datum(sv, td); diff --git a/src/pl/plperl/plperl_helpers.h b/src/pl/plperl/plperl_helpers.h index 6b714e52a14..1b6648be1d1 100644 --- a/src/pl/plperl/plperl_helpers.h +++ b/src/pl/plperl/plperl_helpers.h @@ -7,15 +7,15 @@ static inline char * utf_u2e(const char *utf8_str, size_t len) { - int enc = GetDatabaseEncoding(); + int enc = GetDatabaseEncoding(); char *ret = (char *) pg_do_encoding_conversion((unsigned char *) utf8_str, len, PG_UTF8, enc); /* - * when we are a PG_UTF8 or SQL_ASCII database - * pg_do_encoding_conversion() will not do any conversion or - * verification. we need to do it manually instead. - */ + * when we are a PG_UTF8 or SQL_ASCII database pg_do_encoding_conversion() + * will not do any conversion or verification. we need to do it manually + * instead. + */ if (enc == PG_UTF8 || enc == PG_SQL_ASCII) pg_verify_mbstr_len(PG_UTF8, utf8_str, len, false); @@ -45,7 +45,8 @@ utf_e2u(const char *str) static inline char * sv2cstr(SV *sv) { - char *val, *res; + char *val, + *res; STRLEN len; /* @@ -54,23 +55,26 @@ sv2cstr(SV *sv) * SvPVutf8() croaks nastily on certain things, like typeglobs and * readonly objects such as $^V. That's a perl bug - it's not supposed to * happen. To avoid crashing the backend, we make a copy of the sv before - * passing it to SvPVutf8(). The copy is garbage collected - * when we're done with it. + * passing it to SvPVutf8(). The copy is garbage collected when we're done + * with it. */ if (SvREADONLY(sv) || isGV_with_GP(sv) || (SvTYPE(sv) > SVt_PVLV && SvTYPE(sv) != SVt_PVFM)) sv = newSVsv(sv); else - /* increase the reference count so we can just SvREFCNT_dec() it when - * we are done */ + + /* + * increase the reference count so we can just SvREFCNT_dec() it when + * we are done + */ SvREFCNT_inc_simple_void(sv); val = SvPVutf8(sv, len); /* - * we use perl's length in the event we had an embedded null byte to ensure - * we error out properly + * we use perl's length in the event we had an embedded null byte to + * ensure we error out properly */ res = utf_u2e(val, len); |