Files
uwrap/documentation/source/tutorial/c_strings/c_strings.wrp
2020-09-29 15:51:59 -04:00

19 lines
461 B
Plaintext

import ada.wrappers;
import ada.transformations;
walk wrap_ada_specs ();
match DefiningName (x"(.*)_h")
wrap w_DefiningName ("\1_Wrapped");
match ParamSpec()
and p_type_expression ().filter ("Interfaces.C.Strings.chars_ptr")
and not p_defining_name ().filter ("leaveMeAlone")
walk chars_into_string ();
match SubpDecl
(f_subp_spec
(x"^function"
and p_returns ().filter ("Interfaces.C.Strings.chars_ptr")))
walk chars_into_string ();