Browse Source

UTTTTTTTER PEP-SPECIFIC HACK!!! PEP-SESSION (we need to handle forward declarations)

master
heck 5 years ago
parent
commit
56b5228616
  1. 11
      pEpACIDgen/gen_backend/gen_pybind11.ysl2

11
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" {

Loading…
Cancel
Save