Browse Source

handle structs containing function pointers (not supported, currently)

master
heck 4 years ago
parent
commit
02df91e8b8
  1. 15
      pEpACIDgen/gen_backend/gen_pybind11.ysl2

15
pEpACIDgen/gen_backend/gen_pybind11.ysl2

@ -187,15 +187,27 @@ tstylesheet {
|
}
function "type_is_fptr" {
param "type";
choose {
when "contains($type,'(')" {
> true
} otherwise {
> false
}
}
}
template "field" {
param "structname";
param "name", "@name";
param "type", "@type";
const "is_fptr" call "type_is_fptr" with "type", "$type";
const "array_type", "substring-before($type, '[')";
const "array_len", "substring-before(substring-after($type, '['),']')";
if "$is_fptr != 'true'" { // function pointers not supported, currently
choose {
// If is array type
when "string-length($array_len) > 0" {
@ -285,6 +297,9 @@ tstylesheet {
}
}
}
}
}
template "enum" {

Loading…
Cancel
Save