From: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
---|---|
To: | PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | forward declaration in c |
Date: | 2009-05-25 11:20:05 |
Message-ID: | 162867790905250420r5c96963ofdded4351f91a062@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hello
I can't to find fine syntax for cyclic declaration:
.
typedef Node *(*TransformColumnRef_hook_type) (ParseState *pstate,
ColumnRef *cref);
typedef struct ParseState
{
struct ParseState *parentParseState; /* stack link */
const char *p_sourcetext; /* source text, or NULL if not
available */
List *p_rtable; /* range table so far */
List *p_joinexprs; /* JoinExprs for RTE_JOIN
p_rtable entries */
List *p_joinlist; /* join items so far (will
become FromExpr
*
node's fromlist) */
List *p_relnamespace; /* current namespace for relations */
List *p_varnamespace; /* current namespace for columns */
List *p_ctenamespace; /* current namespace for common
table exprs */
List *p_future_ctes; /* common table exprs not yet
in namespace */
List *p_windowdefs; /* raw representations of
window clauses */
Oid *p_paramtypes; /* OIDs of types for
$n parameter symbols */
int p_numparams; /* allocated size of
p_paramtypes[] */
int p_next_resno; /* next targetlist
resno to assign */
List *p_locking_clause; /* raw FOR UPDATE/FOR
SHARE info */
Node *p_value_substitute; /* what to replace
VALUE with, if any */
bool p_variableparams;
bool p_hasAggs;
bool p_hasWindowFuncs;
bool p_hasSubLinks;
bool p_is_insert;
bool p_is_update;
Relation p_target_relation;
RangeTblEntry *p_target_rangetblentry;
TransformColumnRef_hook_type transformColumnRef_hook;
} ParseState;
with empty declaration typedef struct ParseState;
I got errors:
In file included from ../../../src/include/catalog/heap.h:18,
from parse_clause.c:20:
../../../src/include/parser/parse_node.h:79: warning: useless storage
class specifier in empty declaration
../../../src/include/parser/parse_node.h:81: error: expected ‘)’
before ‘*’ token
../../../src/include/parser/parse_node.h:109: error: expected
specifier-qualifier-list before ‘TransformColumnRef_hook_type’
thank you
Pavel
From | Date | Subject | |
---|---|---|---|
Next Message | Martijn van Oosterhout | 2009-05-25 11:39:56 | Re: forward declaration in c |
Previous Message | Robert Haas | 2009-05-25 11:14:56 | Re: generic options for explain |