mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-04-30 11:24:10 -04:00
clang-format: Increase column limit from 80 to 120
This commit is contained in:
@@ -51,8 +51,7 @@ bool import_python(const char *python_path, python_version_t *python_version)
|
||||
python_path = "";
|
||||
|
||||
if (!python_version) {
|
||||
blog(LOG_DEBUG,
|
||||
"[Python] Invalid python_version pointer provided.");
|
||||
blog(LOG_DEBUG, "[Python] Invalid python_version pointer provided.");
|
||||
goto fail;
|
||||
}
|
||||
|
||||
@@ -68,8 +67,7 @@ bool import_python(const char *python_path, python_version_t *python_version)
|
||||
char cur_version[5];
|
||||
char next_version[5];
|
||||
|
||||
snprintf(cur_version, sizeof(cur_version), VERSION_PATTERN,
|
||||
PY_MAJOR_VERSION_MAX, PY_MINOR_VERSION_MAX);
|
||||
snprintf(cur_version, sizeof(cur_version), VERSION_PATTERN, PY_MAJOR_VERSION_MAX, PY_MINOR_VERSION_MAX);
|
||||
|
||||
struct dstr temp;
|
||||
dstr_init(&temp);
|
||||
@@ -77,8 +75,7 @@ bool import_python(const char *python_path, python_version_t *python_version)
|
||||
|
||||
int minor_version = PY_MINOR_VERSION_MAX;
|
||||
do {
|
||||
dstr_printf(&lib_candidate_path, "%s%s", lib_path.array,
|
||||
temp.array);
|
||||
dstr_printf(&lib_candidate_path, "%s%s", lib_path.array, temp.array);
|
||||
if (access(lib_candidate_path.array, F_OK) == 0) {
|
||||
lib = os_dlopen(lib_candidate_path.array);
|
||||
}
|
||||
@@ -87,10 +84,8 @@ bool import_python(const char *python_path, python_version_t *python_version)
|
||||
break;
|
||||
}
|
||||
|
||||
snprintf(cur_version, sizeof(cur_version), VERSION_PATTERN,
|
||||
PY_MAJOR_VERSION_MAX, minor_version);
|
||||
snprintf(next_version, sizeof(next_version), VERSION_PATTERN,
|
||||
PY_MAJOR_VERSION_MAX, --minor_version);
|
||||
snprintf(cur_version, sizeof(cur_version), VERSION_PATTERN, PY_MAJOR_VERSION_MAX, minor_version);
|
||||
snprintf(next_version, sizeof(next_version), VERSION_PATTERN, PY_MAJOR_VERSION_MAX, --minor_version);
|
||||
dstr_replace(&temp, cur_version, next_version);
|
||||
} while (minor_version > 5);
|
||||
|
||||
@@ -98,22 +93,20 @@ bool import_python(const char *python_path, python_version_t *python_version)
|
||||
dstr_free(&lib_candidate_path);
|
||||
|
||||
if (!lib) {
|
||||
blog(LOG_WARNING, "[Python] Could not load library: %s",
|
||||
lib_path.array);
|
||||
blog(LOG_WARNING, "[Python] Could not load library: %s", lib_path.array);
|
||||
goto fail;
|
||||
}
|
||||
|
||||
python_version->major = PY_MAJOR_VERSION_MAX;
|
||||
python_version->minor = minor_version;
|
||||
|
||||
#define IMPORT_FUNC(x) \
|
||||
do { \
|
||||
Import_##x = os_dlsym(lib, #x); \
|
||||
if (!Import_##x) { \
|
||||
blog(LOG_WARNING, "[Python] Failed to import: %s", \
|
||||
#x); \
|
||||
goto fail; \
|
||||
} \
|
||||
#define IMPORT_FUNC(x) \
|
||||
do { \
|
||||
Import_##x = os_dlsym(lib, #x); \
|
||||
if (!Import_##x) { \
|
||||
blog(LOG_WARNING, "[Python] Failed to import: %s", #x); \
|
||||
goto fail; \
|
||||
} \
|
||||
} while (false)
|
||||
|
||||
IMPORT_FUNC(PyType_Ready);
|
||||
|
||||
Reference in New Issue
Block a user