From 6956b8a50e10cbe7a8d10c821a95df73ad3011a0 Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Sun, 26 Jul 2015 11:23:06 +0200 Subject: [PATCH] python interface: do not treat function pointer as pointer to isl_* structure Since 370a8b7 (introduce isl_bool and isl_stat return types, Mon May 4 09:45:16 2015 +0200), the type of a callback starts with "isl_stat" and so it would mistakenly get identified as a pointer to an isl_* structure. Signed-off-by: Sven Verdoolaege --- interface/python.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/interface/python.cc b/interface/python.cc index 0b4c0e28..6bef4f32 100644 --- a/interface/python.cc +++ b/interface/python.cc @@ -143,7 +143,12 @@ static bool first_arg_is_isl_ctx(FunctionDecl *fd) static bool is_isl_type(QualType type) { if (type->isPointerType()) { - string s = type->getPointeeType().getAsString(); + string s; + + type = type->getPointeeType(); + if (type->isFunctionType()) + return false; + s = type.getAsString(); return s.substr(0, 4) == "isl_"; } -- 2.11.4.GIT