root
root copied to clipboard
[PyROOT] Get names and types of all overloads' signature
This PR introduces a machinery to get the names and types (separately) of the signature of each overload of a particular CPPOverload
object. This allows for example for something like.
EDIT
Here is the latest status of this feature after some discussion:
>>> import ROOT
>>> ROOT.gInterpreter.Declare("""
int foo(int a, float b);
int foo(int a);
float foo(float b);
double foo(int a, float b, double c);
... """)
True
>>> ROOT.foo
<cppyy.CPPOverload object at 0x7fc470789fd0>
>>> from pprint import pprint
>>> pprint(ROOT.foo.func_overloads_names)
{'double ::foo(int a, float b, double c)': ('a', 'b', 'c'),
'float ::foo(float b)': ('b',),
'int ::foo(int a)': ('a',),
'int ::foo(int a, float b)': ('a', 'b')}
>>> pprint(ROOT.foo.func_overloads_types)
{'double ::foo(int a, float b, double c)': {'input_types': ('int',
'float',
'double'),
'return_type': 'double'},
'float ::foo(float b)': {'input_types': ('float',), 'return_type': 'float'},
'int ::foo(int a)': {'input_types': ('int',), 'return_type': 'int'},
'int ::foo(int a, float b)': {'input_types': ('int', 'float'),
'return_type': 'int'}}
Starting build on ROOT-debian10-i386
/cxx14
, ROOT-performance-centos8-multicore
/default
, ROOT-ubuntu16
/nortcxxmod
, ROOT-ubuntu2004
/soversion
, mac1014
/python3
, mac11.0
/cxx17
, windows10
/cxx14
How to customize builds
Build failed on mac11.0/cxx17. Running on macphsft20.dyndns.cern.ch:/Users/sftnight/build/workspace/root-pullrequests-build See console output.
Warnings:
- [2021-10-18T17:44:04.405Z] /Users/sftnight/build/workspace/root-pullrequests-build/root/bindings/pyroot/cppyy/CPyCppyy/src/CPPMethod.h:26:23: warning: 'GetSignature' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
- [2021-10-18T17:44:04.405Z] /Users/sftnight/build/workspace/root-pullrequests-build/root/bindings/pyroot/cppyy/CPyCppyy/src/CPPMethod.h:29:23: warning: 'GetPrototype' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
- [2021-10-18T17:44:04.405Z] /Users/sftnight/build/workspace/root-pullrequests-build/root/bindings/pyroot/cppyy/CPyCppyy/src/CPPMethod.h:30:23: warning: 'GetPriority' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
- [2021-10-18T17:44:04.406Z] /Users/sftnight/build/workspace/root-pullrequests-build/root/bindings/pyroot/cppyy/CPyCppyy/src/CPPMethod.h:31:18: warning: 'IsGreedy' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
- [2021-10-18T17:44:04.406Z] /Users/sftnight/build/workspace/root-pullrequests-build/root/bindings/pyroot/cppyy/CPyCppyy/src/CPPMethod.h:33:23: warning: 'GetMaxArgs' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
- [2021-10-18T17:44:04.406Z] /Users/sftnight/build/workspace/root-pullrequests-build/root/bindings/pyroot/cppyy/CPyCppyy/src/CPPMethod.h:34:23: warning: 'GetCoVarNames' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
- [2021-10-18T17:44:04.406Z] /Users/sftnight/build/workspace/root-pullrequests-build/root/bindings/pyroot/cppyy/CPyCppyy/src/CPPMethod.h:35:23: warning: 'GetArgDefault' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
- [2021-10-18T17:44:04.406Z] /Users/sftnight/build/workspace/root-pullrequests-build/root/bindings/pyroot/cppyy/CPyCppyy/src/CPPMethod.h:36:23: warning: 'GetScopeProxy' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
- [2021-10-18T17:44:04.406Z] /Users/sftnight/build/workspace/root-pullrequests-build/root/bindings/pyroot/cppyy/CPyCppyy/src/CPPMethod.h:37:35: warning: 'GetFunctionAddress' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
- [2021-10-18T17:44:04.406Z] /Users/sftnight/build/workspace/root-pullrequests-build/root/bindings/pyroot/cppyy/CPyCppyy/src/CPPMethod.h:39:25: warning: 'Clone' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
And 212 more
Failing tests:
Build failed on mac1014/python3. Running on macitois22.dyndns.cern.ch:/Users/sftnight/build/workspace/root-pullrequests-build See console output.
Warnings:
- [2021-10-18T17:43:31.343Z] /Volumes/HD2/build/workspace/root-pullrequests-build/root/bindings/pyroot/cppyy/CPyCppyy/src/CPPMethod.h:26:23: warning: 'GetSignature' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
- [2021-10-18T17:43:31.343Z] /Volumes/HD2/build/workspace/root-pullrequests-build/root/bindings/pyroot/cppyy/CPyCppyy/src/CPPMethod.h:29:23: warning: 'GetPrototype' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
- [2021-10-18T17:43:31.602Z] /Volumes/HD2/build/workspace/root-pullrequests-build/root/bindings/pyroot/cppyy/CPyCppyy/src/CPPMethod.h:30:23: warning: 'GetPriority' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
- [2021-10-18T17:43:31.602Z] /Volumes/HD2/build/workspace/root-pullrequests-build/root/bindings/pyroot/cppyy/CPyCppyy/src/CPPMethod.h:31:18: warning: 'IsGreedy' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
- [2021-10-18T17:43:31.602Z] /Volumes/HD2/build/workspace/root-pullrequests-build/root/bindings/pyroot/cppyy/CPyCppyy/src/CPPMethod.h:33:23: warning: 'GetMaxArgs' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
- [2021-10-18T17:43:31.602Z] /Volumes/HD2/build/workspace/root-pullrequests-build/root/bindings/pyroot/cppyy/CPyCppyy/src/CPPMethod.h:34:23: warning: 'GetCoVarNames' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
- [2021-10-18T17:43:31.602Z] /Volumes/HD2/build/workspace/root-pullrequests-build/root/bindings/pyroot/cppyy/CPyCppyy/src/CPPMethod.h:35:23: warning: 'GetArgDefault' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
- [2021-10-18T17:43:31.602Z] /Volumes/HD2/build/workspace/root-pullrequests-build/root/bindings/pyroot/cppyy/CPyCppyy/src/CPPMethod.h:36:23: warning: 'GetScopeProxy' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
- [2021-10-18T17:43:31.602Z] /Volumes/HD2/build/workspace/root-pullrequests-build/root/bindings/pyroot/cppyy/CPyCppyy/src/CPPMethod.h:37:35: warning: 'GetFunctionAddress' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
- [2021-10-18T17:43:31.603Z] /Volumes/HD2/build/workspace/root-pullrequests-build/root/bindings/pyroot/cppyy/CPyCppyy/src/CPPMethod.h:39:25: warning: 'Clone' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
And 101 more
Starting build on ROOT-debian10-i386
/cxx14
, ROOT-performance-centos8-multicore
/default
, ROOT-ubuntu16
/nortcxxmod
, ROOT-ubuntu2004
/soversion
, mac1014
/python3
, mac11.0
/cxx17
, windows10
/cxx14
How to customize builds
Build failed on mac11.0/cxx17. Running on macphsft20.dyndns.cern.ch:/Users/sftnight/build/workspace/root-pullrequests-build See console output.
Failing tests:
Starting build on ROOT-debian10-i386
/soversion
, ROOT-performance-centos8-multicore
/cxx17
, ROOT-ubuntu18.04
/nortcxxmod
, ROOT-ubuntu2004
/python3
, mac1015
/cxx17
, mac11
/cxx14
, windows10
/cxx14
How to customize builds