Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 91e7926

Browse files
committed
Remove no-longer-required function declarations.
Remove a bunch of "extern Datum foo(PG_FUNCTION_ARGS);" declarations that are no longer needed now that PG_FUNCTION_INFO_V1(foo) provides that. Some of these were evidently missed in commit e7128e8, but others were cargo-culted in in code added since then. Possibly that can be blamed in part on the fact that we'd not fixed relevant documentation examples, which I've now done.
1 parent 807b9e0 commit 91e7926

File tree

37 files changed

+3
-170
lines changed

37 files changed

+3
-170
lines changed

contrib/hstore_plperl/hstore_plperl.c

-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ PG_MODULE_MAGIC;
99

1010

1111
PG_FUNCTION_INFO_V1(hstore_to_plperl);
12-
Datum hstore_to_plperl(PG_FUNCTION_ARGS);
1312

1413
Datum
1514
hstore_to_plperl(PG_FUNCTION_ARGS)
@@ -39,7 +38,6 @@ hstore_to_plperl(PG_FUNCTION_ARGS)
3938

4039

4140
PG_FUNCTION_INFO_V1(plperl_to_hstore);
42-
Datum plperl_to_hstore(PG_FUNCTION_ARGS);
4341

4442
Datum
4543
plperl_to_hstore(PG_FUNCTION_ARGS)

contrib/hstore_plpython/hstore_plpython.c

-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ PG_MODULE_MAGIC;
88

99

1010
PG_FUNCTION_INFO_V1(hstore_to_plpython);
11-
Datum hstore_to_plpython(PG_FUNCTION_ARGS);
1211

1312
Datum
1413
hstore_to_plpython(PG_FUNCTION_ARGS)
@@ -45,7 +44,6 @@ hstore_to_plpython(PG_FUNCTION_ARGS)
4544

4645

4746
PG_FUNCTION_INFO_V1(plpython_to_hstore);
48-
Datum plpython_to_hstore(PG_FUNCTION_ARGS);
4947

5048
Datum
5149
plpython_to_hstore(PG_FUNCTION_ARGS)

contrib/ltree_plpython/ltree_plpython.c

-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ PG_MODULE_MAGIC;
77

88

99
PG_FUNCTION_INFO_V1(ltree_to_plpython);
10-
Datum ltree_to_plpython(PG_FUNCTION_ARGS);
1110

1211
Datum
1312
ltree_to_plpython(PG_FUNCTION_ARGS)

contrib/pg_audit/pg_audit.c

-4
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,6 @@ PG_MODULE_MAGIC;
4242

4343
void _PG_init(void);
4444

45-
/* Prototypes for functions used with event triggers */
46-
Datum pg_audit_ddl_command_end(PG_FUNCTION_ARGS);
47-
Datum pg_audit_sql_drop(PG_FUNCTION_ARGS);
48-
4945
PG_FUNCTION_INFO_V1(pg_audit_ddl_command_end);
5046
PG_FUNCTION_INFO_V1(pg_audit_sql_drop);
5147

doc/src/sgml/event-trigger.sgml

-2
Original file line numberDiff line numberDiff line change
@@ -998,8 +998,6 @@ typedef struct EventTriggerData
998998

999999
PG_MODULE_MAGIC;
10001000

1001-
Datum noddl(PG_FUNCTION_ARGS);
1002-
10031001
PG_FUNCTION_INFO_V1(noddl);
10041002

10051003
Datum

doc/src/sgml/gist.sgml

-9
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,6 @@ LANGUAGE C STRICT;
327327
And the matching code in the C module could then follow this skeleton:
328328

329329
<programlisting>
330-
Datum my_consistent(PG_FUNCTION_ARGS);
331330
PG_FUNCTION_INFO_V1(my_consistent);
332331

333332
Datum
@@ -390,7 +389,6 @@ LANGUAGE C STRICT;
390389
And the matching code in the C module could then follow this skeleton:
391390

392391
<programlisting>
393-
Datum my_union(PG_FUNCTION_ARGS);
394392
PG_FUNCTION_INFO_V1(my_union);
395393

396394
Datum
@@ -464,7 +462,6 @@ LANGUAGE C STRICT;
464462
And the matching code in the C module could then follow this skeleton:
465463

466464
<programlisting>
467-
Datum my_compress(PG_FUNCTION_ARGS);
468465
PG_FUNCTION_INFO_V1(my_compress);
469466

470467
Datum
@@ -525,7 +522,6 @@ LANGUAGE C STRICT;
525522
And the matching code in the C module could then follow this skeleton:
526523

527524
<programlisting>
528-
Datum my_decompress(PG_FUNCTION_ARGS);
529525
PG_FUNCTION_INFO_V1(my_decompress);
530526

531527
Datum
@@ -565,7 +561,6 @@ LANGUAGE C STRICT; -- in some cases penalty functions need not be strict
565561
And the matching code in the C module could then follow this skeleton:
566562

567563
<programlisting>
568-
Datum my_penalty(PG_FUNCTION_ARGS);
569564
PG_FUNCTION_INFO_V1(my_penalty);
570565

571566
Datum
@@ -614,7 +609,6 @@ LANGUAGE C STRICT;
614609
And the matching code in the C module could then follow this skeleton:
615610

616611
<programlisting>
617-
Datum my_picksplit(PG_FUNCTION_ARGS);
618612
PG_FUNCTION_INFO_V1(my_picksplit);
619613

620614
Datum
@@ -721,7 +715,6 @@ LANGUAGE C STRICT;
721715
And the matching code in the C module could then follow this skeleton:
722716

723717
<programlisting>
724-
Datum my_same(PG_FUNCTION_ARGS);
725718
PG_FUNCTION_INFO_V1(my_same);
726719

727720
Datum
@@ -772,7 +765,6 @@ LANGUAGE C STRICT;
772765
And the matching code in the C module could then follow this skeleton:
773766

774767
<programlisting>
775-
Datum my_distance(PG_FUNCTION_ARGS);
776768
PG_FUNCTION_INFO_V1(my_distance);
777769

778770
Datum
@@ -859,7 +851,6 @@ LANGUAGE C STRICT;
859851
The matching code in the C module could then follow this skeleton:
860852

861853
<programlisting>
862-
Datum my_fetch(PG_FUNCTION_ARGS);
863854
PG_FUNCTION_INFO_V1(my_fetch);
864855

865856
Datum

doc/src/sgml/trigger.sgml

-4
Original file line numberDiff line numberDiff line change
@@ -709,11 +709,7 @@ CREATE TABLE ttest (
709709
#include "commands/trigger.h" /* ... triggers ... */
710710
#include "utils/rel.h" /* ... and relations */
711711

712-
#ifdef PG_MODULE_MAGIC
713712
PG_MODULE_MAGIC;
714-
#endif
715-
716-
extern Datum trigf(PG_FUNCTION_ARGS);
717713

718714
PG_FUNCTION_INFO_V1(trigf);
719715

src/backend/snowball/dict_snowball.c

-2
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,8 @@
6161
PG_MODULE_MAGIC;
6262

6363
PG_FUNCTION_INFO_V1(dsnowball_init);
64-
Datum dsnowball_init(PG_FUNCTION_ARGS);
6564

6665
PG_FUNCTION_INFO_V1(dsnowball_lexize);
67-
Datum dsnowball_lexize(PG_FUNCTION_ARGS);
6866

6967
/* List of supported modules */
7068
typedef struct stemmer_module

src/backend/utils/mb/conversion_procs/ascii_and_mic/ascii_and_mic.c

-3
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,6 @@ PG_MODULE_MAGIC;
2020
PG_FUNCTION_INFO_V1(ascii_to_mic);
2121
PG_FUNCTION_INFO_V1(mic_to_ascii);
2222

23-
extern Datum ascii_to_mic(PG_FUNCTION_ARGS);
24-
extern Datum mic_to_ascii(PG_FUNCTION_ARGS);
25-
2623
/* ----------
2724
* conv_proc(
2825
* INTEGER, -- source encoding id

src/backend/utils/mb/conversion_procs/cyrillic_and_mic/cyrillic_and_mic.c

-21
Original file line numberDiff line numberDiff line change
@@ -40,27 +40,6 @@ PG_FUNCTION_INFO_V1(win1251_to_iso);
4040
PG_FUNCTION_INFO_V1(iso_to_win866);
4141
PG_FUNCTION_INFO_V1(win866_to_iso);
4242

43-
extern Datum koi8r_to_mic(PG_FUNCTION_ARGS);
44-
extern Datum mic_to_koi8r(PG_FUNCTION_ARGS);
45-
extern Datum iso_to_mic(PG_FUNCTION_ARGS);
46-
extern Datum mic_to_iso(PG_FUNCTION_ARGS);
47-
extern Datum win1251_to_mic(PG_FUNCTION_ARGS);
48-
extern Datum mic_to_win1251(PG_FUNCTION_ARGS);
49-
extern Datum win866_to_mic(PG_FUNCTION_ARGS);
50-
extern Datum mic_to_win866(PG_FUNCTION_ARGS);
51-
extern Datum koi8r_to_win1251(PG_FUNCTION_ARGS);
52-
extern Datum win1251_to_koi8r(PG_FUNCTION_ARGS);
53-
extern Datum koi8r_to_win866(PG_FUNCTION_ARGS);
54-
extern Datum win866_to_koi8r(PG_FUNCTION_ARGS);
55-
extern Datum win866_to_win1251(PG_FUNCTION_ARGS);
56-
extern Datum win1251_to_win866(PG_FUNCTION_ARGS);
57-
extern Datum iso_to_koi8r(PG_FUNCTION_ARGS);
58-
extern Datum koi8r_to_iso(PG_FUNCTION_ARGS);
59-
extern Datum iso_to_win1251(PG_FUNCTION_ARGS);
60-
extern Datum win1251_to_iso(PG_FUNCTION_ARGS);
61-
extern Datum iso_to_win866(PG_FUNCTION_ARGS);
62-
extern Datum win866_to_iso(PG_FUNCTION_ARGS);
63-
6443
/* ----------
6544
* conv_proc(
6645
* INTEGER, -- source encoding id

src/backend/utils/mb/conversion_procs/euc2004_sjis2004/euc2004_sjis2004.c

-3
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,6 @@ PG_MODULE_MAGIC;
1919
PG_FUNCTION_INFO_V1(euc_jis_2004_to_shift_jis_2004);
2020
PG_FUNCTION_INFO_V1(shift_jis_2004_to_euc_jis_2004);
2121

22-
extern Datum euc_jis_2004_to_shift_jis_2004(PG_FUNCTION_ARGS);
23-
extern Datum shift_jis_2004_to_euc_jis_2004(PG_FUNCTION_ARGS);
24-
2522
static void euc_jis_20042shift_jis_2004(const unsigned char *euc, unsigned char *p, int len);
2623
static void shift_jis_20042euc_jis_2004(const unsigned char *sjis, unsigned char *p, int len);
2724

src/backend/utils/mb/conversion_procs/euc_cn_and_mic/euc_cn_and_mic.c

-3
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,6 @@ PG_MODULE_MAGIC;
2020
PG_FUNCTION_INFO_V1(euc_cn_to_mic);
2121
PG_FUNCTION_INFO_V1(mic_to_euc_cn);
2222

23-
extern Datum euc_cn_to_mic(PG_FUNCTION_ARGS);
24-
extern Datum mic_to_euc_cn(PG_FUNCTION_ARGS);
25-
2623
/* ----------
2724
* conv_proc(
2825
* INTEGER, -- source encoding id

src/backend/utils/mb/conversion_procs/euc_jp_and_sjis/euc_jp_and_sjis.c

-7
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,6 @@ PG_FUNCTION_INFO_V1(mic_to_euc_jp);
3636
PG_FUNCTION_INFO_V1(sjis_to_mic);
3737
PG_FUNCTION_INFO_V1(mic_to_sjis);
3838

39-
extern Datum euc_jp_to_sjis(PG_FUNCTION_ARGS);
40-
extern Datum sjis_to_euc_jp(PG_FUNCTION_ARGS);
41-
extern Datum euc_jp_to_mic(PG_FUNCTION_ARGS);
42-
extern Datum mic_to_euc_jp(PG_FUNCTION_ARGS);
43-
extern Datum sjis_to_mic(PG_FUNCTION_ARGS);
44-
extern Datum mic_to_sjis(PG_FUNCTION_ARGS);
45-
4639
/* ----------
4740
* conv_proc(
4841
* INTEGER, -- source encoding id

src/backend/utils/mb/conversion_procs/euc_kr_and_mic/euc_kr_and_mic.c

-3
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,6 @@ PG_MODULE_MAGIC;
2020
PG_FUNCTION_INFO_V1(euc_kr_to_mic);
2121
PG_FUNCTION_INFO_V1(mic_to_euc_kr);
2222

23-
extern Datum euc_kr_to_mic(PG_FUNCTION_ARGS);
24-
extern Datum mic_to_euc_kr(PG_FUNCTION_ARGS);
25-
2623
/* ----------
2724
* conv_proc(
2825
* INTEGER, -- source encoding id

src/backend/utils/mb/conversion_procs/euc_tw_and_big5/euc_tw_and_big5.c

-7
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,6 @@ PG_FUNCTION_INFO_V1(mic_to_euc_tw);
2626
PG_FUNCTION_INFO_V1(big5_to_mic);
2727
PG_FUNCTION_INFO_V1(mic_to_big5);
2828

29-
extern Datum euc_tw_to_big5(PG_FUNCTION_ARGS);
30-
extern Datum big5_to_euc_tw(PG_FUNCTION_ARGS);
31-
extern Datum euc_tw_to_mic(PG_FUNCTION_ARGS);
32-
extern Datum mic_to_euc_tw(PG_FUNCTION_ARGS);
33-
extern Datum big5_to_mic(PG_FUNCTION_ARGS);
34-
extern Datum mic_to_big5(PG_FUNCTION_ARGS);
35-
3629
/* ----------
3730
* conv_proc(
3831
* INTEGER, -- source encoding id

src/backend/utils/mb/conversion_procs/latin2_and_win1250/latin2_and_win1250.c

-7
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,6 @@ PG_FUNCTION_INFO_V1(mic_to_win1250);
2626
PG_FUNCTION_INFO_V1(latin2_to_win1250);
2727
PG_FUNCTION_INFO_V1(win1250_to_latin2);
2828

29-
extern Datum latin2_to_mic(PG_FUNCTION_ARGS);
30-
extern Datum mic_to_latin2(PG_FUNCTION_ARGS);
31-
extern Datum win1250_to_mic(PG_FUNCTION_ARGS);
32-
extern Datum mic_to_win1250(PG_FUNCTION_ARGS);
33-
extern Datum latin2_to_win1250(PG_FUNCTION_ARGS);
34-
extern Datum win1250_to_latin2(PG_FUNCTION_ARGS);
35-
3629
/* ----------
3730
* conv_proc(
3831
* INTEGER, -- source encoding id

src/backend/utils/mb/conversion_procs/latin_and_mic/latin_and_mic.c

-7
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,6 @@ PG_FUNCTION_INFO_V1(mic_to_latin3);
2424
PG_FUNCTION_INFO_V1(latin4_to_mic);
2525
PG_FUNCTION_INFO_V1(mic_to_latin4);
2626

27-
extern Datum latin1_to_mic(PG_FUNCTION_ARGS);
28-
extern Datum mic_to_latin1(PG_FUNCTION_ARGS);
29-
extern Datum latin3_to_mic(PG_FUNCTION_ARGS);
30-
extern Datum mic_to_latin3(PG_FUNCTION_ARGS);
31-
extern Datum latin4_to_mic(PG_FUNCTION_ARGS);
32-
extern Datum mic_to_latin4(PG_FUNCTION_ARGS);
33-
3427
/* ----------
3528
* conv_proc(
3629
* INTEGER, -- source encoding id

src/backend/utils/mb/conversion_procs/utf8_and_ascii/utf8_and_ascii.c

-3
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,6 @@ PG_MODULE_MAGIC;
2020
PG_FUNCTION_INFO_V1(ascii_to_utf8);
2121
PG_FUNCTION_INFO_V1(utf8_to_ascii);
2222

23-
extern Datum ascii_to_utf8(PG_FUNCTION_ARGS);
24-
extern Datum utf8_to_ascii(PG_FUNCTION_ARGS);
25-
2623
/* ----------
2724
* conv_proc(
2825
* INTEGER, -- source encoding id

src/backend/utils/mb/conversion_procs/utf8_and_big5/utf8_and_big5.c

-3
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,6 @@ PG_MODULE_MAGIC;
2222
PG_FUNCTION_INFO_V1(big5_to_utf8);
2323
PG_FUNCTION_INFO_V1(utf8_to_big5);
2424

25-
extern Datum big5_to_utf8(PG_FUNCTION_ARGS);
26-
extern Datum utf8_to_big5(PG_FUNCTION_ARGS);
27-
2825
/* ----------
2926
* conv_proc(
3027
* INTEGER, -- source encoding id

src/backend/utils/mb/conversion_procs/utf8_and_cyrillic/utf8_and_cyrillic.c

-6
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,6 @@ PG_FUNCTION_INFO_V1(koi8r_to_utf8);
2727
PG_FUNCTION_INFO_V1(utf8_to_koi8u);
2828
PG_FUNCTION_INFO_V1(koi8u_to_utf8);
2929

30-
extern Datum utf8_to_koi8r(PG_FUNCTION_ARGS);
31-
extern Datum koi8r_to_utf8(PG_FUNCTION_ARGS);
32-
33-
extern Datum utf8_to_koi8u(PG_FUNCTION_ARGS);
34-
extern Datum koi8u_to_utf8(PG_FUNCTION_ARGS);
35-
3630
/* ----------
3731
* conv_proc(
3832
* INTEGER, -- source encoding id

src/backend/utils/mb/conversion_procs/utf8_and_euc2004/utf8_and_euc2004.c

-3
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,6 @@ PG_MODULE_MAGIC;
2424
PG_FUNCTION_INFO_V1(euc_jis_2004_to_utf8);
2525
PG_FUNCTION_INFO_V1(utf8_to_euc_jis_2004);
2626

27-
extern Datum euc_jis_2004_to_utf8(PG_FUNCTION_ARGS);
28-
extern Datum utf8_to_euc_jis_2004(PG_FUNCTION_ARGS);
29-
3027
/* ----------
3128
* conv_proc(
3229
* INTEGER, -- source encoding id

src/backend/utils/mb/conversion_procs/utf8_and_euc_cn/utf8_and_euc_cn.c

-3
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,6 @@ PG_MODULE_MAGIC;
2222
PG_FUNCTION_INFO_V1(euc_cn_to_utf8);
2323
PG_FUNCTION_INFO_V1(utf8_to_euc_cn);
2424

25-
extern Datum euc_cn_to_utf8(PG_FUNCTION_ARGS);
26-
extern Datum utf8_to_euc_cn(PG_FUNCTION_ARGS);
27-
2825
/* ----------
2926
* conv_proc(
3027
* INTEGER, -- source encoding id

src/backend/utils/mb/conversion_procs/utf8_and_euc_jp/utf8_and_euc_jp.c

-3
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,6 @@ PG_MODULE_MAGIC;
2222
PG_FUNCTION_INFO_V1(euc_jp_to_utf8);
2323
PG_FUNCTION_INFO_V1(utf8_to_euc_jp);
2424

25-
extern Datum euc_jp_to_utf8(PG_FUNCTION_ARGS);
26-
extern Datum utf8_to_euc_jp(PG_FUNCTION_ARGS);
27-
2825
/* ----------
2926
* conv_proc(
3027
* INTEGER, -- source encoding id

src/backend/utils/mb/conversion_procs/utf8_and_euc_kr/utf8_and_euc_kr.c

-3
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,6 @@ PG_MODULE_MAGIC;
2222
PG_FUNCTION_INFO_V1(euc_kr_to_utf8);
2323
PG_FUNCTION_INFO_V1(utf8_to_euc_kr);
2424

25-
extern Datum euc_kr_to_utf8(PG_FUNCTION_ARGS);
26-
extern Datum utf8_to_euc_kr(PG_FUNCTION_ARGS);
27-
2825
/* ----------
2926
* conv_proc(
3027
* INTEGER, -- source encoding id

src/backend/utils/mb/conversion_procs/utf8_and_euc_tw/utf8_and_euc_tw.c

-3
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,6 @@ PG_MODULE_MAGIC;
2222
PG_FUNCTION_INFO_V1(euc_tw_to_utf8);
2323
PG_FUNCTION_INFO_V1(utf8_to_euc_tw);
2424

25-
extern Datum euc_tw_to_utf8(PG_FUNCTION_ARGS);
26-
extern Datum utf8_to_euc_tw(PG_FUNCTION_ARGS);
27-
2825
/* ----------
2926
* conv_proc(
3027
* INTEGER, -- source encoding id

src/backend/utils/mb/conversion_procs/utf8_and_gb18030/utf8_and_gb18030.c

-3
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,6 @@ PG_MODULE_MAGIC;
2222
PG_FUNCTION_INFO_V1(gb18030_to_utf8);
2323
PG_FUNCTION_INFO_V1(utf8_to_gb18030);
2424

25-
extern Datum gb18030_to_utf8(PG_FUNCTION_ARGS);
26-
extern Datum utf8_to_gb18030(PG_FUNCTION_ARGS);
27-
2825
/*
2926
* Convert 4-byte GB18030 characters to and from a linear code space
3027
*

src/backend/utils/mb/conversion_procs/utf8_and_gbk/utf8_and_gbk.c

-3
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,6 @@ PG_MODULE_MAGIC;
2222
PG_FUNCTION_INFO_V1(gbk_to_utf8);
2323
PG_FUNCTION_INFO_V1(utf8_to_gbk);
2424

25-
extern Datum gbk_to_utf8(PG_FUNCTION_ARGS);
26-
extern Datum utf8_to_gbk(PG_FUNCTION_ARGS);
27-
2825
/* ----------
2926
* conv_proc(
3027
* INTEGER, -- source encoding id

src/backend/utils/mb/conversion_procs/utf8_and_iso8859/utf8_and_iso8859.c

-3
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,6 @@ PG_MODULE_MAGIC;
4646
PG_FUNCTION_INFO_V1(iso8859_to_utf8);
4747
PG_FUNCTION_INFO_V1(utf8_to_iso8859);
4848

49-
extern Datum iso8859_to_utf8(PG_FUNCTION_ARGS);
50-
extern Datum utf8_to_iso8859(PG_FUNCTION_ARGS);
51-
5249
/* ----------
5350
* conv_proc(
5451
* INTEGER, -- source encoding id

0 commit comments

Comments
 (0)