diff options
| author | jvoisin | 2022-05-03 00:23:49 +0200 |
|---|---|---|
| committer | jvoisin | 2022-05-03 00:23:49 +0200 |
| commit | 04633d1384edf4fc80be626c29e5f848b17a78bf (patch) | |
| tree | 27ac353697e1dd11eb92ecf1f6efe0de0a234296 /src/sp_var_value.c | |
| parent | 9b11f4105eacc2af8828b65fd946e2b584cdee7e (diff) | |
Constify a bit sp_var_value.c
Diffstat (limited to 'src/sp_var_value.c')
| -rw-r--r-- | src/sp_var_value.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/sp_var_value.c b/src/sp_var_value.c index fe37f99..c9e5ade 100644 --- a/src/sp_var_value.c +++ b/src/sp_var_value.c | |||
| @@ -111,7 +111,7 @@ static void *get_entry_hashtable(const HashTable *const ht, | |||
| 111 | 111 | ||
| 112 | static zval *get_array_value(zend_execute_data *ed, const zval *const zvalue, | 112 | static zval *get_array_value(zend_execute_data *ed, const zval *const zvalue, |
| 113 | const sp_tree *const tree) { | 113 | const sp_tree *const tree) { |
| 114 | zval *idx_value = sp_get_var_value(ed, tree->idx, false); | 114 | const zval *const idx_value = sp_get_var_value(ed, tree->idx, false); |
| 115 | 115 | ||
| 116 | if (!zvalue || !idx_value) { | 116 | if (!zvalue || !idx_value) { |
| 117 | return NULL; | 117 | return NULL; |
| @@ -129,9 +129,8 @@ static zval *get_array_value(zend_execute_data *ed, const zval *const zvalue, | |||
| 129 | static zval *get_object_property(zend_execute_data *ed, zval *object, | 129 | static zval *get_object_property(zend_execute_data *ed, zval *object, |
| 130 | const char *property, bool is_param) { | 130 | const char *property, bool is_param) { |
| 131 | const char *const class_name = object->value.obj->ce->name->val; | 131 | const char *const class_name = object->value.obj->ce->name->val; |
| 132 | HashTable *array = Z_OBJPROP_P(object); | 132 | const HashTable *const array = Z_OBJPROP_P(object); |
| 133 | zval *zvalue = NULL; | 133 | const zval *const property_val = get_var_value(ed, property, is_param); |
| 134 | const zval *property_val = get_var_value(ed, property, is_param); | ||
| 135 | size_t len; | 134 | size_t len; |
| 136 | 135 | ||
| 137 | if (property_val) { | 136 | if (property_val) { |
| @@ -141,7 +140,7 @@ static zval *get_object_property(zend_execute_data *ed, zval *object, | |||
| 141 | property = Z_STRVAL_P(property_val); | 140 | property = Z_STRVAL_P(property_val); |
| 142 | } | 141 | } |
| 143 | } | 142 | } |
| 144 | zvalue = get_entry_hashtable(array, property, strlen(property)); | 143 | zval *zvalue = get_entry_hashtable(array, property, strlen(property)); |
| 145 | // TODO do we want to log overflow? | 144 | // TODO do we want to log overflow? |
| 146 | if (!zvalue) { | 145 | if (!zvalue) { |
| 147 | len = strlen(property) + 4; | 146 | len = strlen(property) + 4; |
