diff --git a/src/controller/python/chip/native/CommonStackInit.cpp b/src/controller/python/chip/native/CommonStackInit.cpp index a6a9b3e455899e..5fa470713b2079 100644 --- a/src/controller/python/chip/native/CommonStackInit.cpp +++ b/src/controller/python/chip/native/CommonStackInit.cpp @@ -31,6 +31,7 @@ #include #include +#include #include #include #include @@ -41,11 +42,11 @@ static_assert(std::is_same::value, "pyth extern "C" { -CHIP_ERROR pychip_CommonStackInit() +chip::ChipError::StorageType pychip_CommonStackInit() { - ReturnErrorOnFailure(chip::Platform::MemoryInit()); - ReturnErrorOnFailure(chip::DeviceLayer::PlatformMgr().InitChipStack()); - return CHIP_NO_ERROR; + ReturnErrorOnFailure(chip::Platform::MemoryInit().AsInteger()); + ReturnErrorOnFailure(chip::DeviceLayer::PlatformMgr().InitChipStack().AsInteger()); + return CHIP_NO_ERROR.AsInteger(); } void pychip_CommonStackShutdown() diff --git a/src/controller/python/chip/native/__init__.py b/src/controller/python/chip/native/__init__.py index e147f684f605e3..44b4ccd89f015e 100644 --- a/src/controller/python/chip/native/__init__.py +++ b/src/controller/python/chip/native/__init__.py @@ -76,7 +76,7 @@ def GetLibraryHandle() -> ctypes.CDLL: if _nativeLibraryHandle is None: _nativeLibraryHandle = ctypes.CDLL(FindNativeLibraryPath()) setter = NativeLibraryHandleMethodArguments(_nativeLibraryHandle) - setter.Set("pychip_CommonStackInit", None, []) + setter.Set("pychip_CommonStackInit", ctypes.c_uint32, []) # # We've a split initialization model with some init happening here and some other