forked from enlightenment/efl
docs: support refs and new types in generator
This commit is contained in:
parent
96b960c953
commit
1a1fc6172c
|
@ -762,6 +762,9 @@ local wrap_type_attrs = function(tp, str)
|
||||||
if ffunc then
|
if ffunc then
|
||||||
str = "free(" .. str .. ", " .. ffunc .. ")"
|
str = "free(" .. str .. ", " .. ffunc .. ")"
|
||||||
end
|
end
|
||||||
|
if tp:is_ref() then
|
||||||
|
str = "ref(" .. str .. ")"
|
||||||
|
end
|
||||||
return str
|
return str
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -793,6 +796,13 @@ get_type_str = function(tp)
|
||||||
suffix = "*"
|
suffix = "*"
|
||||||
end
|
end
|
||||||
return wrap_type_attrs(tp, get_type_str(btp) .. suffix)
|
return wrap_type_attrs(tp, get_type_str(btp) .. suffix)
|
||||||
|
elseif tpt == tps.STATIC_ARRAY then
|
||||||
|
return wrap_type_attrs(tp, "static_array<"
|
||||||
|
.. get_type_str(tp:base_type_get()) .. ", "
|
||||||
|
.. tp:array_size_get() .. ">")
|
||||||
|
elseif tpt == tps.TERMINATED_ARRAY then
|
||||||
|
return wrap_type_attrs(tp, "terminated_array<"
|
||||||
|
.. get_type_str(tp:base_type_get()) .. ">")
|
||||||
end
|
end
|
||||||
error("unhandled type type: " .. tpt)
|
error("unhandled type type: " .. tpt)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue