From 56b522861685edeac9165ff59c384c66258d92fd Mon Sep 17 00:00:00 2001 From: heck Date: Tue, 19 Jan 2021 05:19:24 +0100 Subject: [PATCH] UTTTTTTTER PEP-SPECIFIC HACK!!! PEP-SESSION (we need to handle forward declarations) --- pEpACIDgen/gen_backend/gen_pybind11.ysl2 | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/pEpACIDgen/gen_backend/gen_pybind11.ysl2 b/pEpACIDgen/gen_backend/gen_pybind11.ysl2 index ecab36b..cc68ee8 100644 --- a/pEpACIDgen/gen_backend/gen_pybind11.ysl2 +++ b/pEpACIDgen/gen_backend/gen_pybind11.ysl2 @@ -30,13 +30,16 @@ tstylesheet { template "return" { > «@type» } - + // TODO: UTTTTER PEP-SPECIFIC HACKS (PEP_SESSION) template "use", mode="arg_list" { const "name", "@name"; const "type", "@type"; choose { when "$type = 'const char *'" { |> strdup(«$name»)`if "position()!=last()" > ,` + } + when "$type = 'PEP_SESSION'" { + |> pep_session()`if "position()!=last()" > ,` } otherwise { |> «$name»`if "position()!=last()" > ,` } @@ -46,7 +49,11 @@ tstylesheet { template "use", mode="lambda_sig" { const "name", "@name"; const "type", "@type"; - > «$type» «$name»`if "position()!=last()"> , ` + choose { + when "$type != 'PEP_SESSION'"{ + > «$type» «$name»`if "position()!=last()"> , ` + } + } } template "signature" {