fixes building

This commit is contained in:
Jaume Bellet 2023-12-02 16:05:37 +01:00
parent c5cfd962f0
commit 2285de9e8d
3 changed files with 5 additions and 5 deletions

View File

@ -48,7 +48,7 @@ void MB_init(void) {
MB_patches_discover();
}
const char* MB_patch_get(int pos) {
char* MB_patch_get(int pos) {
BLI_assert(pos < MAX_MB_PATCHES);
return *patches[pos] == '\0' ? nullptr : patches[pos];
}

View File

@ -7,7 +7,7 @@
void MB_init(void);
void MB_patches_discover(void);
const char* MB_patch_get(int pos);
char* MB_patch_get(int pos);
void MB_print_info(void);
#endif

View File

@ -33,7 +33,7 @@ static PyObject *make_mblender_info()
PyObject *mblender_info;
PyObject *list;
int pos=0;
char **patches;
char *patch = nullptr;
mblender_info = PyStructSequence_New(&BlenderAppMblenderType);
if (mblender_info == nullptr) {
@ -45,8 +45,8 @@ static PyObject *make_mblender_info()
PyStructSequence_SET_ITEM(mblender_info, pos++, list);
for (char** p = MB_patches_get(); *p ;p++) {
PyList_Append(list, PyUnicode_FromString(*p));
for (int i =0 ; (patch = MB_patch_get(i)); i++) {
PyList_Append(list, PyUnicode_FromString(patch));
}