add isl_ast_node_if_get_else_node as alternative name for ..._get_else
commit4d0511bcb0837248dd120953410a966db942bf7c
authorSven Verdoolaege <sven@cerebras.net>
Mon, 19 Nov 2018 15:28:02 +0000 (19 16:28 +0100)
committerSven Verdoolaege <sven@cerebras.net>
Wed, 5 Dec 2018 08:52:21 +0000 (5 09:52 +0100)
tree6de2fadb7c1ea4fe8750597c75afee7a3dd7d99a
parentf5f35ae1c3b4edcbb18b8bd639361256cf8c1030
add isl_ast_node_if_get_else_node as alternative name for ..._get_else

In an upcoming commit, the bindings generator will be changed
to export "get" functions as two methods, one with and one without
the "get_" prefix.  For the function isl_ast_node_if_get_else,
this means a method called "else" would be generated,
which is a keyword in both C++ and Python.
While it would be possible to add a special case for this function
such that no method without "get_" prefix would be generated,
a solution that does not involve special cases is preferred.

This commit renames the "get_else" function to "get_else_node"
such that the generated method will be called "else_node"
instead of "else".
It is the new name that gets exported instead of the original name.
Unfortunately, the original name was already exported in
isl-0.20-780-ge7f6f8a57 (export isl_ast_node methods,
Tue Oct 16 16:43:21 2018 +0200), so this may break code
of early adopters.  Still, no incompatibility with respect
to previous releases is introduced because the export was
added after the latest release.

For consistency of function naming, the functions
isl_ast_node_if_has_else and isl_ast_node_if_get_then
are renamed in a similar way.

The original names are preserved in the C interface
for backward compatibility.

Signed-off-by: Sven Verdoolaege <sven@cerebras.net>
doc/user.pod
include/isl/ast.h
isl_ast.c