Skip to content

Commit

Permalink
Fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
mrjerryjohns committed Jul 7, 2022
1 parent ab27923 commit e6a7b2b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions src/controller/python/chip/native/CommonStackInit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
#include <system/SystemError.h>
#include <system/SystemLayer.h>

#include <lib/core/CHIPError.h>
#include <lib/support/CHIPMem.h>
#include <lib/support/CodeUtils.h>
#include <lib/support/ScopedBuffer.h>
Expand All @@ -41,11 +42,11 @@ static_assert(std::is_same<uint32_t, chip::ChipError::StorageType>::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()
Expand Down
2 changes: 1 addition & 1 deletion src/controller/python/chip/native/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e6a7b2b

Please sign in to comment.