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

Commit 2ae7811

Browse files
author
Michael Meskes
committed
Small code cleanup.
Declare static variable as static and external as extern.
1 parent 98b3743 commit 2ae7811

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

src/interfaces/ecpg/preproc/ecpg.header

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ static char *forward_name = NULL;
5959
struct ECPGtype ecpg_no_indicator = {ECPGt_NO_INDICATOR, NULL, NULL, NULL, {NULL}, 0};
6060
struct variable no_indicator = {"no_indicator", &ecpg_no_indicator, 0, NULL};
6161

62-
struct ECPGtype ecpg_query = {ECPGt_char_variable, NULL, NULL, NULL, {NULL}, 0};
62+
static struct ECPGtype ecpg_query = {ECPGt_char_variable, NULL, NULL, NULL, {NULL}, 0};
6363

6464
/*
6565
* Handle parsing errors and warnings

src/interfaces/ecpg/preproc/ecpg_keywords.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,6 @@
1616
#include "extern.h"
1717
#include "preproc.h"
1818

19-
/* Globals from keywords.c */
20-
extern const ScanKeyword SQLScanKeywords[];
21-
extern const int NumSQLScanKeywords;
22-
2319
/*
2420
* List of (keyword-name, keyword-token-value) pairs.
2521
*

src/interfaces/ecpg/preproc/extern.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,10 @@ extern struct when when_error,
5858
when_warn;
5959
extern struct ECPGstruct_member *struct_member_list[STRUCT_DEPTH];
6060

61+
/* Globals from keywords.c */
62+
extern const ScanKeyword SQLScanKeywords[];
63+
extern const int NumSQLScanKeywords;
64+
6165
/* functions */
6266

6367
extern const char *get_dtype(enum ECPGdtype);

src/interfaces/ecpg/preproc/keywords.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717

1818
#include "parser/keywords.h"
1919
#include "type.h"
20+
#include "extern.h"
2021
#include "preproc.h"
2122

2223
#define PG_KEYWORD(a,b,c) {a,b,c},

0 commit comments

Comments
 (0)