Skip to content

Commit

Permalink
fix typing of Struct.__call__ method
Browse files Browse the repository at this point in the history
Summary: Explicitly cast this `cdef` instance variable to `py3.types.Struct` parent class to avoid compilation error when making generated `Struct` `cython.final`

Reviewed By: yoney

Differential Revision: D68469108

fbshipit-source-id: 676ef451057acba009e9cd6e9b48f16c07402af7
  • Loading branch information
ahilger authored and facebook-github-bot committed Jan 22, 2025
1 parent 02e86b9 commit a456801
Show file tree
Hide file tree
Showing 45 changed files with 130 additions and 130 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ cdef class {{struct:name}}({{> types/python_struct_class}}):
__fbthrift_inst.{{> types/cpp_obj}} = make_shared[{{> types/current_module_cbindings}}.{{> types/c_struct }}](deref(self.{{> types/cpp_obj}}))
__fbthrift_inst._fields_setter = _fbthrift_types_fields.__{{struct:name}}_FieldsSetter._fbthrift_create(__fbthrift_inst.{{> types/cpp_obj}}.get())
for __fbthrift_name, _fbthrift_value in kwargs.items():
__fbthrift_inst._fbthrift_set_field(__fbthrift_name, _fbthrift_value)
(<thrift.py3.types.Struct>__fbthrift_inst)._fbthrift_set_field(__fbthrift_name, _fbthrift_value)
return __fbthrift_inst
{{/struct:py3_fields?}}
{{/struct:cpp_noncopyable?}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ cdef class MyStructNestedAnnotation(thrift.py3.types.Struct):
__fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = make_shared[_module_cbindings.cMyStructNestedAnnotation](deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE))
__fbthrift_inst._fields_setter = _fbthrift_types_fields.__MyStructNestedAnnotation_FieldsSetter._fbthrift_create(__fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get())
for __fbthrift_name, _fbthrift_value in kwargs.items():
__fbthrift_inst._fbthrift_set_field(__fbthrift_name, _fbthrift_value)
(<thrift.py3.types.Struct>__fbthrift_inst)._fbthrift_set_field(__fbthrift_name, _fbthrift_value)
return __fbthrift_inst

cdef void _fbthrift_set_field(self, str name, object value) except *:
Expand Down Expand Up @@ -197,7 +197,7 @@ cdef class SecretStruct(thrift.py3.types.Struct):
__fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = make_shared[_module_cbindings.cSecretStruct](deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE))
__fbthrift_inst._fields_setter = _fbthrift_types_fields.__SecretStruct_FieldsSetter._fbthrift_create(__fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get())
for __fbthrift_name, _fbthrift_value in kwargs.items():
__fbthrift_inst._fbthrift_set_field(__fbthrift_name, _fbthrift_value)
(<thrift.py3.types.Struct>__fbthrift_inst)._fbthrift_set_field(__fbthrift_name, _fbthrift_value)
return __fbthrift_inst

cdef void _fbthrift_set_field(self, str name, object value) except *:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ cdef class MyStruct(thrift.py3.types.Struct):
__fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = make_shared[_test_fixtures_enumstrict_module_cbindings.cMyStruct](deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE))
__fbthrift_inst._fields_setter = _fbthrift_types_fields.__MyStruct_FieldsSetter._fbthrift_create(__fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get())
for __fbthrift_name, _fbthrift_value in kwargs.items():
__fbthrift_inst._fbthrift_set_field(__fbthrift_name, _fbthrift_value)
(<thrift.py3.types.Struct>__fbthrift_inst)._fbthrift_set_field(__fbthrift_name, _fbthrift_value)
return __fbthrift_inst

cdef void _fbthrift_set_field(self, str name, object value) except *:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ cdef class MyStruct(thrift.py3.types.Struct):
__fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = make_shared[_module_cbindings.cMyStruct](deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE))
__fbthrift_inst._fields_setter = _fbthrift_types_fields.__MyStruct_FieldsSetter._fbthrift_create(__fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get())
for __fbthrift_name, _fbthrift_value in kwargs.items():
__fbthrift_inst._fbthrift_set_field(__fbthrift_name, _fbthrift_value)
(<thrift.py3.types.Struct>__fbthrift_inst)._fbthrift_set_field(__fbthrift_name, _fbthrift_value)
return __fbthrift_inst

cdef void _fbthrift_set_field(self, str name, object value) except *:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ cdef class MyStruct(thrift.py3.types.Struct):
__fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = make_shared[_test_fixtures_basic_module_cbindings.cMyStruct](deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE))
__fbthrift_inst._fields_setter = _fbthrift_types_fields.__MyStruct_FieldsSetter._fbthrift_create(__fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get())
for __fbthrift_name, _fbthrift_value in kwargs.items():
__fbthrift_inst._fbthrift_set_field(__fbthrift_name, _fbthrift_value)
(<thrift.py3.types.Struct>__fbthrift_inst)._fbthrift_set_field(__fbthrift_name, _fbthrift_value)
return __fbthrift_inst

cdef void _fbthrift_set_field(self, str name, object value) except *:
Expand Down Expand Up @@ -274,7 +274,7 @@ cdef class Containers(thrift.py3.types.Struct):
__fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = make_shared[_test_fixtures_basic_module_cbindings.cContainers](deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE))
__fbthrift_inst._fields_setter = _fbthrift_types_fields.__Containers_FieldsSetter._fbthrift_create(__fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get())
for __fbthrift_name, _fbthrift_value in kwargs.items():
__fbthrift_inst._fbthrift_set_field(__fbthrift_name, _fbthrift_value)
(<thrift.py3.types.Struct>__fbthrift_inst)._fbthrift_set_field(__fbthrift_name, _fbthrift_value)
return __fbthrift_inst

cdef void _fbthrift_set_field(self, str name, object value) except *:
Expand Down Expand Up @@ -979,7 +979,7 @@ cdef class ReservedKeyword(thrift.py3.types.Struct):
__fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = make_shared[_test_fixtures_basic_module_cbindings.cReservedKeyword](deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE))
__fbthrift_inst._fields_setter = _fbthrift_types_fields.__ReservedKeyword_FieldsSetter._fbthrift_create(__fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get())
for __fbthrift_name, _fbthrift_value in kwargs.items():
__fbthrift_inst._fbthrift_set_field(__fbthrift_name, _fbthrift_value)
(<thrift.py3.types.Struct>__fbthrift_inst)._fbthrift_set_field(__fbthrift_name, _fbthrift_value)
return __fbthrift_inst

cdef void _fbthrift_set_field(self, str name, object value) except *:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -658,7 +658,7 @@ cdef class Val(thrift.py3.types.Struct):
__fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = make_shared[_module_cbindings.cVal](deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE))
__fbthrift_inst._fields_setter = _fbthrift_types_fields.__Val_FieldsSetter._fbthrift_create(__fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get())
for __fbthrift_name, _fbthrift_value in kwargs.items():
__fbthrift_inst._fbthrift_set_field(__fbthrift_name, _fbthrift_value)
(<thrift.py3.types.Struct>__fbthrift_inst)._fbthrift_set_field(__fbthrift_name, _fbthrift_value)
return __fbthrift_inst

cdef void _fbthrift_set_field(self, str name, object value) except *:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ cdef class Internship(thrift.py3.types.Struct):
__fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = make_shared[_module_cbindings.cInternship](deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE))
__fbthrift_inst._fields_setter = _fbthrift_types_fields.__Internship_FieldsSetter._fbthrift_create(__fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get())
for __fbthrift_name, _fbthrift_value in kwargs.items():
__fbthrift_inst._fbthrift_set_field(__fbthrift_name, _fbthrift_value)
(<thrift.py3.types.Struct>__fbthrift_inst)._fbthrift_set_field(__fbthrift_name, _fbthrift_value)
return __fbthrift_inst

cdef void _fbthrift_set_field(self, str name, object value) except *:
Expand Down Expand Up @@ -253,7 +253,7 @@ cdef class Range(thrift.py3.types.Struct):
__fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = make_shared[_module_cbindings.cRange](deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE))
__fbthrift_inst._fields_setter = _fbthrift_types_fields.__Range_FieldsSetter._fbthrift_create(__fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get())
for __fbthrift_name, _fbthrift_value in kwargs.items():
__fbthrift_inst._fbthrift_set_field(__fbthrift_name, _fbthrift_value)
(<thrift.py3.types.Struct>__fbthrift_inst)._fbthrift_set_field(__fbthrift_name, _fbthrift_value)
return __fbthrift_inst

cdef void _fbthrift_set_field(self, str name, object value) except *:
Expand Down Expand Up @@ -376,7 +376,7 @@ cdef class struct1(thrift.py3.types.Struct):
__fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = make_shared[_module_cbindings.cstruct1](deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE))
__fbthrift_inst._fields_setter = _fbthrift_types_fields.__struct1_FieldsSetter._fbthrift_create(__fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get())
for __fbthrift_name, _fbthrift_value in kwargs.items():
__fbthrift_inst._fbthrift_set_field(__fbthrift_name, _fbthrift_value)
(<thrift.py3.types.Struct>__fbthrift_inst)._fbthrift_set_field(__fbthrift_name, _fbthrift_value)
return __fbthrift_inst

cdef void _fbthrift_set_field(self, str name, object value) except *:
Expand Down Expand Up @@ -499,7 +499,7 @@ cdef class struct2(thrift.py3.types.Struct):
__fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = make_shared[_module_cbindings.cstruct2](deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE))
__fbthrift_inst._fields_setter = _fbthrift_types_fields.__struct2_FieldsSetter._fbthrift_create(__fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get())
for __fbthrift_name, _fbthrift_value in kwargs.items():
__fbthrift_inst._fbthrift_set_field(__fbthrift_name, _fbthrift_value)
(<thrift.py3.types.Struct>__fbthrift_inst)._fbthrift_set_field(__fbthrift_name, _fbthrift_value)
return __fbthrift_inst

cdef void _fbthrift_set_field(self, str name, object value) except *:
Expand Down Expand Up @@ -642,7 +642,7 @@ cdef class struct3(thrift.py3.types.Struct):
__fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = make_shared[_module_cbindings.cstruct3](deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE))
__fbthrift_inst._fields_setter = _fbthrift_types_fields.__struct3_FieldsSetter._fbthrift_create(__fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get())
for __fbthrift_name, _fbthrift_value in kwargs.items():
__fbthrift_inst._fbthrift_set_field(__fbthrift_name, _fbthrift_value)
(<thrift.py3.types.Struct>__fbthrift_inst)._fbthrift_set_field(__fbthrift_name, _fbthrift_value)
return __fbthrift_inst

cdef void _fbthrift_set_field(self, str name, object value) except *:
Expand Down Expand Up @@ -775,7 +775,7 @@ cdef class struct4(thrift.py3.types.Struct):
__fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = make_shared[_module_cbindings.cstruct4](deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE))
__fbthrift_inst._fields_setter = _fbthrift_types_fields.__struct4_FieldsSetter._fbthrift_create(__fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get())
for __fbthrift_name, _fbthrift_value in kwargs.items():
__fbthrift_inst._fbthrift_set_field(__fbthrift_name, _fbthrift_value)
(<thrift.py3.types.Struct>__fbthrift_inst)._fbthrift_set_field(__fbthrift_name, _fbthrift_value)
return __fbthrift_inst

cdef void _fbthrift_set_field(self, str name, object value) except *:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ cdef class SomeStruct(thrift.py3.types.Struct):
__fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = make_shared[_test_fixtures_enums_module_cbindings.cSomeStruct](deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE))
__fbthrift_inst._fields_setter = _fbthrift_types_fields.__SomeStruct_FieldsSetter._fbthrift_create(__fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get())
for __fbthrift_name, _fbthrift_value in kwargs.items():
__fbthrift_inst._fbthrift_set_field(__fbthrift_name, _fbthrift_value)
(<thrift.py3.types.Struct>__fbthrift_inst)._fbthrift_set_field(__fbthrift_name, _fbthrift_value)
return __fbthrift_inst

cdef void _fbthrift_set_field(self, str name, object value) except *:
Expand Down Expand Up @@ -235,7 +235,7 @@ cdef class MyStruct(thrift.py3.types.Struct):
__fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = make_shared[_test_fixtures_enums_module_cbindings.cMyStruct](deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE))
__fbthrift_inst._fields_setter = _fbthrift_types_fields.__MyStruct_FieldsSetter._fbthrift_create(__fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get())
for __fbthrift_name, _fbthrift_value in kwargs.items():
__fbthrift_inst._fbthrift_set_field(__fbthrift_name, _fbthrift_value)
(<thrift.py3.types.Struct>__fbthrift_inst)._fbthrift_set_field(__fbthrift_name, _fbthrift_value)
return __fbthrift_inst

cdef void _fbthrift_set_field(self, str name, object value) except *:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ cdef class Included(thrift.py3.types.Struct):
__fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = make_shared[_includes_cbindings.cIncluded](deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE))
__fbthrift_inst._fields_setter = _fbthrift_types_fields.__Included_FieldsSetter._fbthrift_create(__fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get())
for __fbthrift_name, _fbthrift_value in kwargs.items():
__fbthrift_inst._fbthrift_set_field(__fbthrift_name, _fbthrift_value)
(<thrift.py3.types.Struct>__fbthrift_inst)._fbthrift_set_field(__fbthrift_name, _fbthrift_value)
return __fbthrift_inst

cdef void _fbthrift_set_field(self, str name, object value) except *:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ cdef class MyStruct(thrift.py3.types.Struct):
__fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = make_shared[_matching_struct_names_cbindings.cMyStruct](deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE))
__fbthrift_inst._fields_setter = _fbthrift_types_fields.__MyStruct_FieldsSetter._fbthrift_create(__fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get())
for __fbthrift_name, _fbthrift_value in kwargs.items():
__fbthrift_inst._fbthrift_set_field(__fbthrift_name, _fbthrift_value)
(<thrift.py3.types.Struct>__fbthrift_inst)._fbthrift_set_field(__fbthrift_name, _fbthrift_value)
return __fbthrift_inst

cdef void _fbthrift_set_field(self, str name, object value) except *:
Expand Down Expand Up @@ -199,7 +199,7 @@ cdef class Combo(thrift.py3.types.Struct):
__fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = make_shared[_matching_struct_names_cbindings.cCombo](deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE))
__fbthrift_inst._fields_setter = _fbthrift_types_fields.__Combo_FieldsSetter._fbthrift_create(__fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get())
for __fbthrift_name, _fbthrift_value in kwargs.items():
__fbthrift_inst._fbthrift_set_field(__fbthrift_name, _fbthrift_value)
(<thrift.py3.types.Struct>__fbthrift_inst)._fbthrift_set_field(__fbthrift_name, _fbthrift_value)
return __fbthrift_inst

cdef void _fbthrift_set_field(self, str name, object value) except *:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ cdef class MyStruct(thrift.py3.types.Struct):
__fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = make_shared[_module_cbindings.cMyStruct](deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE))
__fbthrift_inst._fields_setter = _fbthrift_types_fields.__MyStruct_FieldsSetter._fbthrift_create(__fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get())
for __fbthrift_name, _fbthrift_value in kwargs.items():
__fbthrift_inst._fbthrift_set_field(__fbthrift_name, _fbthrift_value)
(<thrift.py3.types.Struct>__fbthrift_inst)._fbthrift_set_field(__fbthrift_name, _fbthrift_value)
return __fbthrift_inst

cdef void _fbthrift_set_field(self, str name, object value) except *:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ cdef class Foo(thrift.py3.types.Struct):
__fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = make_shared[_transitive_cbindings.cFoo](deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE))
__fbthrift_inst._fields_setter = _fbthrift_types_fields.__Foo_FieldsSetter._fbthrift_create(__fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get())
for __fbthrift_name, _fbthrift_value in kwargs.items():
__fbthrift_inst._fbthrift_set_field(__fbthrift_name, _fbthrift_value)
(<thrift.py3.types.Struct>__fbthrift_inst)._fbthrift_set_field(__fbthrift_name, _fbthrift_value)
return __fbthrift_inst

cdef void _fbthrift_set_field(self, str name, object value) except *:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ cdef class Included(thrift.py3.types.Struct):
__fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = make_shared[_includes_cbindings.cIncluded](deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE))
__fbthrift_inst._fields_setter = _fbthrift_types_fields.__Included_FieldsSetter._fbthrift_create(__fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get())
for __fbthrift_name, _fbthrift_value in kwargs.items():
__fbthrift_inst._fbthrift_set_field(__fbthrift_name, _fbthrift_value)
(<thrift.py3.types.Struct>__fbthrift_inst)._fbthrift_set_field(__fbthrift_name, _fbthrift_value)
return __fbthrift_inst

cdef void _fbthrift_set_field(self, str name, object value) except *:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ cdef class MyStruct(thrift.py3.types.Struct):
__fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = make_shared[_module_cbindings.cMyStruct](deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE))
__fbthrift_inst._fields_setter = _fbthrift_types_fields.__MyStruct_FieldsSetter._fbthrift_create(__fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get())
for __fbthrift_name, _fbthrift_value in kwargs.items():
__fbthrift_inst._fbthrift_set_field(__fbthrift_name, _fbthrift_value)
(<thrift.py3.types.Struct>__fbthrift_inst)._fbthrift_set_field(__fbthrift_name, _fbthrift_value)
return __fbthrift_inst

cdef void _fbthrift_set_field(self, str name, object value) except *:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ cdef class Foo(thrift.py3.types.Struct):
__fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = make_shared[_transitive_cbindings.cFoo](deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE))
__fbthrift_inst._fields_setter = _fbthrift_types_fields.__Foo_FieldsSetter._fbthrift_create(__fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get())
for __fbthrift_name, _fbthrift_value in kwargs.items():
__fbthrift_inst._fbthrift_set_field(__fbthrift_name, _fbthrift_value)
(<thrift.py3.types.Struct>__fbthrift_inst)._fbthrift_set_field(__fbthrift_name, _fbthrift_value)
return __fbthrift_inst

cdef void _fbthrift_set_field(self, str name, object value) except *:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ cdef class Fields(thrift.py3.types.Struct):
__fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE = make_shared[_foo_cbindings.cFields](deref(self._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE))
__fbthrift_inst._fields_setter = _fbthrift_types_fields.__Fields_FieldsSetter._fbthrift_create(__fbthrift_inst._cpp_obj_FBTHRIFT_ONLY_DO_NOT_USE.get())
for __fbthrift_name, _fbthrift_value in kwargs.items():
__fbthrift_inst._fbthrift_set_field(__fbthrift_name, _fbthrift_value)
(<thrift.py3.types.Struct>__fbthrift_inst)._fbthrift_set_field(__fbthrift_name, _fbthrift_value)
return __fbthrift_inst

cdef void _fbthrift_set_field(self, str name, object value) except *:
Expand Down
Loading

0 comments on commit a456801

Please sign in to comment.