fixes building
This commit is contained in:
parent
c5cfd962f0
commit
2285de9e8d
|
@ -48,7 +48,7 @@ void MB_init(void) {
|
||||||
MB_patches_discover();
|
MB_patches_discover();
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* MB_patch_get(int pos) {
|
char* MB_patch_get(int pos) {
|
||||||
BLI_assert(pos < MAX_MB_PATCHES);
|
BLI_assert(pos < MAX_MB_PATCHES);
|
||||||
return *patches[pos] == '\0' ? nullptr : patches[pos];
|
return *patches[pos] == '\0' ? nullptr : patches[pos];
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
void MB_init(void);
|
void MB_init(void);
|
||||||
void MB_patches_discover(void);
|
void MB_patches_discover(void);
|
||||||
const char* MB_patch_get(int pos);
|
char* MB_patch_get(int pos);
|
||||||
void MB_print_info(void);
|
void MB_print_info(void);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -33,7 +33,7 @@ static PyObject *make_mblender_info()
|
||||||
PyObject *mblender_info;
|
PyObject *mblender_info;
|
||||||
PyObject *list;
|
PyObject *list;
|
||||||
int pos=0;
|
int pos=0;
|
||||||
char **patches;
|
char *patch = nullptr;
|
||||||
|
|
||||||
mblender_info = PyStructSequence_New(&BlenderAppMblenderType);
|
mblender_info = PyStructSequence_New(&BlenderAppMblenderType);
|
||||||
if (mblender_info == nullptr) {
|
if (mblender_info == nullptr) {
|
||||||
|
@ -45,8 +45,8 @@ static PyObject *make_mblender_info()
|
||||||
PyStructSequence_SET_ITEM(mblender_info, pos++, list);
|
PyStructSequence_SET_ITEM(mblender_info, pos++, list);
|
||||||
|
|
||||||
|
|
||||||
for (char** p = MB_patches_get(); *p ;p++) {
|
for (int i =0 ; (patch = MB_patch_get(i)); i++) {
|
||||||
PyList_Append(list, PyUnicode_FromString(*p));
|
PyList_Append(list, PyUnicode_FromString(patch));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue