Skip to content

Commit fefb86b

Browse files
committed
Orthography fixes for new castNode() macro.
Clean up hastily-composed comment. Normalize whitespace. Erik Rijkers and myself
1 parent 7afd56c commit fefb86b

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/include/nodes/nodes.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -559,23 +559,23 @@ extern PGDLLIMPORT Node *newNodeMacroHolder;
559559
#define IsA(nodeptr,_type_) (nodeTag(nodeptr) == T_##_type_)
560560

561561
/*
562-
* castNode(type, ptr) casts ptr to type and, if cassert is enabled, verifies
563-
* that the the c actually has the appropriate type (using it's nodeTag()).
562+
* castNode(type, ptr) casts ptr to "type *", and if assertions are enabled,
563+
* verifies that the node has the appropriate type (using its nodeTag()).
564564
*
565565
* Use an inline function when assertions are enabled, to avoid multiple
566566
* evaluations of the ptr argument (which could e.g. be a function call).
567567
*/
568568
#ifdef USE_ASSERT_CHECKING
569-
static inline Node*
570-
castNodeImpl(enum NodeTag type, void *ptr)
569+
static inline Node *
570+
castNodeImpl(NodeTag type, void *ptr)
571571
{
572572
Assert(ptr == NULL || nodeTag(ptr) == type);
573-
return ptr;
573+
return (Node *) ptr;
574574
}
575575
#define castNode(_type_, nodeptr) ((_type_ *) castNodeImpl(T_##_type_, nodeptr))
576576
#else
577-
#define castNode(_type_,nodeptr) ((_type_ *)(nodeptr))
578-
#endif
577+
#define castNode(_type_, nodeptr) ((_type_ *) (nodeptr))
578+
#endif /* USE_ASSERT_CHECKING */
579579

580580

581581
/* ----------------------------------------------------------------

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy