Skip to content
Snippets Groups Projects
Commit 4cb82469 authored by Peter Eisentraut's avatar Peter Eisentraut
Browse files

Cast result of copyObject() to correct type


copyObject() is declared to return void *, which allows easily assigning
the result independent of the input, but it loses all type checking.

If the compiler supports typeof or something similar, cast the result to
the input type.  This creates a greater amount of type safety.  In some
cases, where the result is assigned to a generic type such as Node * or
Expr *, new casts are now necessary, but in general casts are now
unnecessary in the normal case and indicate that something unusual is
happening.

Reviewed-by: default avatarMark Dilger <hornschnorter@gmail.com>
parent 66b76434
No related branches found
No related tags found
No related merge requests found
Showing
with 121 additions and 53 deletions
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment