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

Function setattrspec

numpy/f2py/crackfortran.py:1893–1917  ·  view source on GitHub ↗
(decl, attr, force=0)

Source from the content-addressed store, hash-verified

1891
1892
1893def setattrspec(decl, attr, force=0):
1894 if not decl:
1895 decl = {}
1896 if not attr:
1897 return decl
1898 if 'attrspec' not in decl:
1899 decl['attrspec'] = [attr]
1900 return decl
1901 if force:
1902 decl['attrspec'].append(attr)
1903 if attr in decl['attrspec']:
1904 return decl
1905 if attr == 'static' and 'automatic' not in decl['attrspec']:
1906 decl['attrspec'].append(attr)
1907 elif attr == 'automatic' and 'static' not in decl['attrspec']:
1908 decl['attrspec'].append(attr)
1909 elif attr == 'public':
1910 if 'private' not in decl['attrspec']:
1911 decl['attrspec'].append(attr)
1912 elif attr == 'private':
1913 if 'public' not in decl['attrspec']:
1914 decl['attrspec'].append(attr)
1915 else:
1916 decl['attrspec'].append(attr)
1917 return decl
1918
1919
1920def setkindselector(decl, sel, force=0):

Callers 3

appenddeclFunction · 0.85
analyzevarsFunction · 0.85
expr2nameFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…