MCPcopy Index your code
hub / github.com/numpy/numpy / getcallprotoargument

Function getcallprotoargument

numpy/f2py/auxfuncs.py:700–735  ·  view source on GitHub ↗
(rout, cb_map={})

Source from the content-addressed store, hash-verified

698
699
700def 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
738def getusercode(rout):

Callers 1

routsign2mapFunction · 0.85

Calls 13

getmultilineblockFunction · 0.85
hascallstatementFunction · 0.85
l_andFunction · 0.85
l_notFunction · 0.85
isintent_callbackFunction · 0.85
getctypeFunction · 0.85
l_orFunction · 0.85
isstringFunction · 0.85
isattr_valueFunction · 0.85
isarrayofstringsFunction · 0.85
isstringarrayFunction · 0.85
joinMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…