(rout, cb_map={})
| 675 | |
| 676 | |
| 677 | def getcallprotoargument(rout, cb_map={}): |
| 678 | r = getmultilineblock(rout, 'callprotoargument', comment=0) |
| 679 | if r: |
| 680 | return r |
| 681 | if hascallstatement(rout): |
| 682 | outmess( |
| 683 | 'warning: callstatement is defined without callprotoargument\n') |
| 684 | return |
| 685 | from .capi_maps import getctype |
| 686 | arg_types, arg_types2 = [], [] |
| 687 | if l_and(isstringfunction, l_not(isfunction_wrap))(rout): |
| 688 | arg_types.extend(['char*', 'size_t']) |
| 689 | for n in rout['args']: |
| 690 | var = rout['vars'][n] |
| 691 | if isintent_callback(var): |
| 692 | continue |
| 693 | if n in cb_map: |
| 694 | ctype = cb_map[n] + '_typedef' |
| 695 | else: |
| 696 | ctype = getctype(var) |
| 697 | if l_and(isintent_c, l_or(isscalar, iscomplex))(var): |
| 698 | pass |
| 699 | elif isstring(var): |
| 700 | pass |
| 701 | else: |
| 702 | if not isattr_value(var): |
| 703 | ctype = ctype + '*' |
| 704 | if ((isstring(var) |
| 705 | or isarrayofstrings(var) # obsolete? |
| 706 | or isstringarray(var))): |
| 707 | arg_types2.append('size_t') |
| 708 | arg_types.append(ctype) |
| 709 | |
| 710 | proto_args = ','.join(arg_types + arg_types2) |
| 711 | if not proto_args: |
| 712 | proto_args = 'void' |
| 713 | return proto_args |
| 714 | |
| 715 | |
| 716 | def getusercode(rout): |
no test coverage detected