(rout, cb_map={})
| 698 | |
| 699 | |
| 700 | def getcallprotoargument(rout, cb_map={}): |
| 701 | r = getmultilineblock(rout, 'callprotoargument', comment=0) |
| 702 | if r: |
| 703 | return r |
| 704 | if hascallstatement(rout): |
| 705 | outmess( |
| 706 | 'warning: callstatement is defined without callprotoargument\n') |
| 707 | return |
| 708 | from .capi_maps import getctype |
| 709 | arg_types, arg_types2 = [], [] |
| 710 | if l_and(isstringfunction, l_not(isfunction_wrap))(rout): |
| 711 | arg_types.extend(['char*', 'size_t']) |
| 712 | for n in rout['args']: |
| 713 | var = rout['vars'][n] |
| 714 | if isintent_callback(var): |
| 715 | continue |
| 716 | if n in cb_map: |
| 717 | ctype = cb_map[n] + '_typedef' |
| 718 | else: |
| 719 | ctype = getctype(var) |
| 720 | if l_and(isintent_c, l_or(isscalar, iscomplex))(var): |
| 721 | pass |
| 722 | elif isstring(var): |
| 723 | pass |
| 724 | elif not isattr_value(var): |
| 725 | ctype = ctype + '*' |
| 726 | if (isstring(var) |
| 727 | or isarrayofstrings(var) # obsolete? |
| 728 | or isstringarray(var)): |
| 729 | arg_types2.append('size_t') |
| 730 | arg_types.append(ctype) |
| 731 | |
| 732 | proto_args = ','.join(arg_types + arg_types2) |
| 733 | if not proto_args: |
| 734 | proto_args = 'void' |
| 735 | return proto_args |
| 736 | |
| 737 | |
| 738 | def getusercode(rout): |
no test coverage detected
searching dependent graphs…