@@ -68,7 +68,7 @@ _store_matches_to_list(pcre2_code_8 *pattern, const FilterXReMatchState *state,
68
68
if (begin_index < 0 || end_index < 0 )
69
69
continue ;
70
70
71
- FilterXObject * value = filterx_string_new ( state -> lhs_str + begin_index , end_index - begin_index );
71
+ FILTERX_STRING_DECLARE_ON_STACK ( value , state -> lhs_str + begin_index , end_index - begin_index );
72
72
gboolean success = filterx_list_append (fillable , & value );
73
73
filterx_object_unref (value );
74
74
@@ -101,8 +101,8 @@ _store_matches_to_dict(pcre2_code_8 *pattern, const FilterXReMatchState *state,
101
101
continue ;
102
102
103
103
g_snprintf (num_str_buf , sizeof (num_str_buf ), "%" G_GUINT32_FORMAT , i );
104
- FilterXObject * key = filterx_string_new ( num_str_buf , -1 );
105
- FilterXObject * value = filterx_string_new ( state -> lhs_str + begin_index , end_index - begin_index );
104
+ FILTERX_STRING_DECLARE_ON_STACK ( key , num_str_buf , -1 );
105
+ FILTERX_STRING_DECLARE_ON_STACK ( value , state -> lhs_str + begin_index , end_index - begin_index );
106
106
107
107
gboolean success = filterx_object_set_subscript (fillable , key , & value );
108
108
@@ -135,8 +135,8 @@ _store_matches_to_dict(pcre2_code_8 *pattern, const FilterXReMatchState *state,
135
135
continue ;
136
136
137
137
g_snprintf (num_str_buf , sizeof (num_str_buf ), "%" G_GUINT32_FORMAT , n );
138
- FilterXObject * num_key = filterx_string_new ( num_str_buf , -1 );
139
- FilterXObject * key = filterx_string_new ( namedgroup_name , -1 );
138
+ FILTERX_STRING_DECLARE_ON_STACK ( num_key , num_str_buf , -1 );
139
+ FILTERX_STRING_DECLARE_ON_STACK ( key , namedgroup_name , -1 );
140
140
FilterXObject * value = filterx_object_get_subscript (fillable , num_key );
141
141
142
142
gboolean success = filterx_object_set_subscript (fillable , key , & value );
0 commit comments