Cleanup: avoid '_ln' suffix
Use '_len' or '_line_number'.
This commit is contained in:
@@ -1223,7 +1223,7 @@ typedef struct uiEditSourceStore {
|
||||
|
||||
typedef struct uiEditSourceButStore {
|
||||
char py_dbg_fn[FILE_MAX];
|
||||
int py_dbg_ln;
|
||||
int py_dbg_line_number;
|
||||
} uiEditSourceButStore;
|
||||
|
||||
/* should only ever be set while the edit source operator is running */
|
||||
@@ -1276,21 +1276,21 @@ void UI_editsource_active_but_test(uiBut *but)
|
||||
struct uiEditSourceButStore *but_store = MEM_callocN(sizeof(uiEditSourceButStore), __func__);
|
||||
|
||||
const char *fn;
|
||||
int lineno = -1;
|
||||
int line_number = -1;
|
||||
|
||||
# if 0
|
||||
printf("comparing buttons: '%s' == '%s'\n", but->drawstr, ui_editsource_info->but_orig.drawstr);
|
||||
# endif
|
||||
|
||||
PyC_FileAndNum_Safe(&fn, &lineno);
|
||||
PyC_FileAndNum_Safe(&fn, &line_number);
|
||||
|
||||
if (lineno != -1) {
|
||||
if (line_number != -1) {
|
||||
BLI_strncpy(but_store->py_dbg_fn, fn, sizeof(but_store->py_dbg_fn));
|
||||
but_store->py_dbg_ln = lineno;
|
||||
but_store->py_dbg_line_number = line_number;
|
||||
}
|
||||
else {
|
||||
but_store->py_dbg_fn[0] = '\0';
|
||||
but_store->py_dbg_ln = -1;
|
||||
but_store->py_dbg_line_number = -1;
|
||||
}
|
||||
|
||||
BLI_ghash_insert(ui_editsource_info->hash, but, but_store);
|
||||
@@ -1375,8 +1375,8 @@ static int editsource_exec(bContext *C, wmOperator *op)
|
||||
}
|
||||
|
||||
if (but_store) {
|
||||
if (but_store->py_dbg_ln != -1) {
|
||||
ret = editsource_text_edit(C, op, but_store->py_dbg_fn, but_store->py_dbg_ln);
|
||||
if (but_store->py_dbg_line_number != -1) {
|
||||
ret = editsource_text_edit(C, op, but_store->py_dbg_fn, but_store->py_dbg_line_number);
|
||||
}
|
||||
else {
|
||||
BKE_report(
|
||||
|
||||
Reference in New Issue
Block a user