From 050f15ef6a0c44dc6a7abbbe0f1954ea1925f473 Mon Sep 17 00:00:00 2001 From: Shaheed Haque Date: Sat, 4 Feb 2017 11:00:16 +0000 Subject: Bindings: Take account of visibility attribute on APIs Don't export API which has visibility "hidden". Visibility attributes on variables are ignored, but call the generic method anyway. Remove checks for macros which obscure the attributes. Processing the attribute directly means that is not needed. --- tests/GenerateSipBindings/testscript.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'tests/GenerateSipBindings/testscript.py') diff --git a/tests/GenerateSipBindings/testscript.py b/tests/GenerateSipBindings/testscript.py index e79706bc..98443d53 100644 --- a/tests/GenerateSipBindings/testscript.py +++ b/tests/GenerateSipBindings/testscript.py @@ -121,3 +121,12 @@ assert(PyTest.CppLib.anotherCustomMethod([2, 3, 5]) == 52) sdo = PyTest.CppLib.SubdirObject() assert(sdo.mul(5, 6) == 30) + +visible = PyTest.CppLib.Visible() +assert visible.visible_fn() + +try: + assert visible.invisible_fn() + assert False +except AttributeError as e: + assert str(e) == "'Visible' object has no attribute 'invisible_fn'" -- cgit v1.2.1