Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2021-12-13 08:22:18 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-12-13 08:22:18 +0300
commit27231afce5e4d0832113415f4d3cdeed480b165f (patch)
treea778c2d8cde07132f6c1ce52caad3a9a7e966d63 /source/blender/python
parent80f1527762c1cac50c04074282088aa12797ec0a (diff)
Cleanup: remove checks for invalid input for Python Run utilities
These arguments must be non-null for useful functionality, there is no need for paranoid checks. The return value in case of invalid input for BPY_run_string_as_number was also wrong (casting -1 to a bool, when false was expected).
Diffstat (limited to 'source/blender/python')
-rw-r--r--source/blender/python/intern/bpy_interface_run.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/source/blender/python/intern/bpy_interface_run.c b/source/blender/python/intern/bpy_interface_run.c
index a4d54a4ce83..bc21c91074f 100644
--- a/source/blender/python/intern/bpy_interface_run.c
+++ b/source/blender/python/intern/bpy_interface_run.c
@@ -340,10 +340,6 @@ bool BPY_run_string_as_number(bContext *C,
PyGILState_STATE gilstate;
bool ok = true;
- if (!r_value || !expr) {
- return -1;
- }
-
if (expr[0] == '\0') {
*r_value = 0.0;
return ok;
@@ -369,7 +365,6 @@ bool BPY_run_string_as_string_and_size(bContext *C,
char **r_value,
size_t *r_value_size)
{
- BLI_assert(r_value && expr);
PyGILState_STATE gilstate;
bool ok = true;
@@ -407,7 +402,6 @@ bool BPY_run_string_as_intptr(bContext *C,
struct BPy_RunErrInfo *err_info,
intptr_t *r_value)
{
- BLI_assert(r_value && expr);
PyGILState_STATE gilstate;
bool ok = true;