bt2: move _append_option to non-const versions of variant classes
authorSimon Marchi <simon.marchi@efficios.com>
Thu, 12 Sep 2019 15:22:05 +0000 (11:22 -0400)
committerFrancis Deslauriers <francis.deslauriers@efficios.com>
Thu, 12 Sep 2019 19:40:22 +0000 (15:40 -0400)
_append_option should not be available on const versions of variant
classes.  Move it to the non-const versions.

Change-Id: I9b3b9ce2c3cfa629a00f95396b2136384d75d1fa
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/2043
CI-Build: Francis Deslauriers <francis.deslauriers@efficios.com>
Tested-by: jenkins <jenkins@lttng.org>
Reviewed-by: Francis Deslauriers <francis.deslauriers@efficios.com>
src/bindings/python/bt2/bt2/field_class.py

index 9bab66278a0025288b6c3c919d94fd9cf69e89b1..26efddee04f79de4de0604cb2f46df6ca39bf05e 100644 (file)
@@ -811,9 +811,6 @@ class _VariantFieldClassWithUnsignedSelectorConst(_VariantFieldClassWithSelector
     _borrow_option_ptr_by_index = staticmethod(
         native_bt.field_class_variant_with_selector_unsigned_borrow_option_by_index_const
     )
     _borrow_option_ptr_by_index = staticmethod(
         native_bt.field_class_variant_with_selector_unsigned_borrow_option_by_index_const
     )
-    _append_option = staticmethod(
-        native_bt.field_class_variant_with_selector_unsigned_append_option
-    )
     _variant_option_pycls = _VariantFieldClassWithUnsignedSelectorOptionConst
     _as_option_ptr = staticmethod(_variant_option_pycls._as_option_ptr)
 
     _variant_option_pycls = _VariantFieldClassWithUnsignedSelectorOptionConst
     _as_option_ptr = staticmethod(_variant_option_pycls._as_option_ptr)
 
@@ -824,6 +821,9 @@ class _VariantFieldClassWithUnsignedSelector(
     _NAME = 'Variant (with unsigned selector)'
     _variant_option_pycls = _VariantFieldClassWithUnsignedSelectorOption
     _as_option_ptr = staticmethod(_variant_option_pycls._as_option_ptr)
     _NAME = 'Variant (with unsigned selector)'
     _variant_option_pycls = _VariantFieldClassWithUnsignedSelectorOption
     _as_option_ptr = staticmethod(_variant_option_pycls._as_option_ptr)
+    _append_option = staticmethod(
+        native_bt.field_class_variant_with_selector_unsigned_append_option
+    )
 
 
 class _VariantFieldClassWithSignedSelectorConst(_VariantFieldClassWithSelectorConst):
 
 
 class _VariantFieldClassWithSignedSelectorConst(_VariantFieldClassWithSelectorConst):
@@ -834,9 +834,6 @@ class _VariantFieldClassWithSignedSelectorConst(_VariantFieldClassWithSelectorCo
     _borrow_option_ptr_by_index = staticmethod(
         native_bt.field_class_variant_with_selector_signed_borrow_option_by_index_const
     )
     _borrow_option_ptr_by_index = staticmethod(
         native_bt.field_class_variant_with_selector_signed_borrow_option_by_index_const
     )
-    _append_option = staticmethod(
-        native_bt.field_class_variant_with_selector_signed_append_option
-    )
     _variant_option_pycls = _VariantFieldClassWithSignedSelectorOptionConst
     _as_option_ptr = staticmethod(_variant_option_pycls._as_option_ptr)
 
     _variant_option_pycls = _VariantFieldClassWithSignedSelectorOptionConst
     _as_option_ptr = staticmethod(_variant_option_pycls._as_option_ptr)
 
@@ -847,6 +844,9 @@ class _VariantFieldClassWithSignedSelector(
     _NAME = 'Variant (with signed selector)'
     _variant_option_pycls = _VariantFieldClassWithSignedSelectorOption
     _as_option_ptr = staticmethod(_variant_option_pycls._as_option_ptr)
     _NAME = 'Variant (with signed selector)'
     _variant_option_pycls = _VariantFieldClassWithSignedSelectorOption
     _as_option_ptr = staticmethod(_variant_option_pycls._as_option_ptr)
+    _append_option = staticmethod(
+        native_bt.field_class_variant_with_selector_signed_append_option
+    )
 
 
 class _ArrayFieldClassConst(_FieldClassConst):
 
 
 class _ArrayFieldClassConst(_FieldClassConst):
This page took 0.027037 seconds and 4 git commands to generate.