|
36 | 36 | 'isintent_nothide', 'isintent_out', 'isintent_overwrite', 'islogical',
|
37 | 37 | 'islogicalfunction', 'islong_complex', 'islong_double',
|
38 | 38 | 'islong_doublefunction', 'islong_long', 'islong_longfunction',
|
39 |
| - 'ismodule', 'ismoduleroutine', 'isoptional', 'isprivate', 'isrequired', |
40 |
| - 'isroutine', 'isscalar', 'issigned_long_longarray', 'isstring', |
41 |
| - 'isstringarray', 'isstring_or_stringarray', 'isstringfunction', |
42 |
| - 'issubroutine', 'get_f2py_modulename', |
43 |
| - 'issubroutine_wrap', 'isthreadsafe', 'isunsigned', 'isunsigned_char', |
44 |
| - 'isunsigned_chararray', 'isunsigned_long_long', |
45 |
| - 'isunsigned_long_longarray', 'isunsigned_short', |
46 |
| - 'isunsigned_shortarray', 'l_and', 'l_not', 'l_or', 'outmess', |
47 |
| - 'replace', 'show', 'stripcomma', 'throw_error', 'isattr_value', |
48 |
| - 'getuseblocks', 'process_f2cmap_dict' |
| 39 | + 'ismodule', 'ismoduleroutine', 'isoptional', 'isprivate', 'isvariable', |
| 40 | + 'isrequired', 'isroutine', 'isscalar', 'issigned_long_longarray', |
| 41 | + 'isstring', 'isstringarray', 'isstring_or_stringarray', 'isstringfunction', |
| 42 | + 'issubroutine', 'get_f2py_modulename', 'issubroutine_wrap', 'isthreadsafe', |
| 43 | + 'isunsigned', 'isunsigned_char', 'isunsigned_chararray', |
| 44 | + 'isunsigned_long_long', 'isunsigned_long_longarray', 'isunsigned_short', |
| 45 | + 'isunsigned_shortarray', 'l_and', 'l_not', 'l_or', 'outmess', 'replace', |
| 46 | + 'show', 'stripcomma', 'throw_error', 'isattr_value', 'getuseblocks', |
| 47 | + 'process_f2cmap_dict' |
49 | 48 | ]
|
50 | 49 |
|
51 | 50 |
|
@@ -518,6 +517,15 @@ def isprivate(var):
|
518 | 517 | return 'attrspec' in var and 'private' in var['attrspec']
|
519 | 518 |
|
520 | 519 |
|
| 520 | +def isvariable(var): |
| 521 | + # heuristic to find public/private declarations of filtered subroutines |
| 522 | + if len(var) == 1 and 'attrspec' in var and \ |
| 523 | + var['attrspec'][0] in ('public', 'private'): |
| 524 | + is_var = False |
| 525 | + else: |
| 526 | + is_var = True |
| 527 | + return is_var |
| 528 | + |
521 | 529 | def hasinitvalue(var):
|
522 | 530 | return '=' in var
|
523 | 531 |
|
|
0 commit comments