Skip to content

Commit c01c56a

Browse files
williagebmyates
authored andcommittedAug 18, 2020
SWIG3 workaround and new .gitignore
SWIG3 has some issues with %pybuffer_binary. A wrapper had already been added since it does not handle void* pointer arguments correctly. This renames the other argument since it also doesn't handle arguments named "size" correctly. This also adds a .gitignore file to reduce the likelihood of editor and build artifacts getting accidentally swept up in git commits.
1 parent 95de431 commit c01c56a

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed
 

‎.gitignore

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Build outputs
2+
/build
3+
/mediadata/merged
4+
5+
# Editor temporary files
6+
*~
7+
.*.sw?

‎zesysman/zesysman.i

+4-4
Original file line numberDiff line numberDiff line change
@@ -139,15 +139,15 @@ os.environ.setdefault('ZES_ENABLE_SYSMAN',"1")
139139
// %pybuffer_binary(void* pImage, uint32_t size);
140140

141141
// So use a char-based wrapper instead:
142-
%pybuffer_binary(char* pImage, uint32_t size);
142+
%pybuffer_binary(char* pImage, uint32_t nBytes);
143143
%inline %{
144144
ze_result_t
145-
zesFirmwareFlashData(zes_firmware_handle_t hFirmware, char* pImage, uint32_t size)
145+
zesFirmwareFlashData(zes_firmware_handle_t hFirmware, char* pImage, uint32_t nBytes)
146146
{
147-
return zesFirmwareFlash(hFirmware, pImage, size);
147+
return zesFirmwareFlash(hFirmware, pImage, nBytes);
148148
}
149149
%}
150-
%clear (char* pImage, uint32_t size);
150+
%clear (char* pImage, uint32_t nBytes);
151151

152152
//
153153
// Standard C constructs

0 commit comments

Comments
 (0)
Please sign in to comment.