@@ -4898,7 +4898,7 @@ fstring_compile_expr(const char *expr_start, const char *expr_end,
4898
4898
4899
4899
len = expr_end - expr_start ;
4900
4900
/* Allocate 3 extra bytes: open paren, close paren, null byte. */
4901
- str = PyMem_RawMalloc (len + 3 );
4901
+ str = PyMem_Malloc (len + 3 );
4902
4902
if (str == NULL ) {
4903
4903
PyErr_NoMemory ();
4904
4904
return NULL ;
@@ -4914,15 +4914,15 @@ fstring_compile_expr(const char *expr_start, const char *expr_end,
4914
4914
mod_n = PyParser_SimpleParseStringFlagsFilename (str , "<fstring>" ,
4915
4915
Py_eval_input , 0 );
4916
4916
if (!mod_n ) {
4917
- PyMem_RawFree (str );
4917
+ PyMem_Free (str );
4918
4918
return NULL ;
4919
4919
}
4920
4920
/* Reuse str to find the correct column offset. */
4921
4921
str [0 ] = '{' ;
4922
4922
str [len + 1 ] = '}' ;
4923
4923
fstring_fix_node_location (n , mod_n , str );
4924
4924
mod = PyAST_FromNode (mod_n , & cf , "<fstring>" , c -> c_arena );
4925
- PyMem_RawFree (str );
4925
+ PyMem_Free (str );
4926
4926
PyNode_Free (mod_n );
4927
4927
if (!mod )
4928
4928
return NULL ;
@@ -5438,17 +5438,17 @@ ExprList_Append(ExprList *l, expr_ty exp)
5438
5438
Py_ssize_t i ;
5439
5439
/* We're still using the cached data. Switch to
5440
5440
alloc-ing. */
5441
- l -> p = PyMem_RawMalloc (sizeof (expr_ty ) * new_size );
5441
+ l -> p = PyMem_Malloc (sizeof (expr_ty ) * new_size );
5442
5442
if (!l -> p )
5443
5443
return -1 ;
5444
5444
/* Copy the cached data into the new buffer. */
5445
5445
for (i = 0 ; i < l -> size ; i ++ )
5446
5446
l -> p [i ] = l -> data [i ];
5447
5447
} else {
5448
5448
/* Just realloc. */
5449
- expr_ty * tmp = PyMem_RawRealloc (l -> p , sizeof (expr_ty ) * new_size );
5449
+ expr_ty * tmp = PyMem_Realloc (l -> p , sizeof (expr_ty ) * new_size );
5450
5450
if (!tmp ) {
5451
- PyMem_RawFree (l -> p );
5451
+ PyMem_Free (l -> p );
5452
5452
l -> p = NULL ;
5453
5453
return -1 ;
5454
5454
}
@@ -5476,7 +5476,7 @@ ExprList_Dealloc(ExprList *l)
5476
5476
/* Do nothing. */
5477
5477
} else {
5478
5478
/* We have dynamically allocated. Free the memory. */
5479
- PyMem_RawFree (l -> p );
5479
+ PyMem_Free (l -> p );
5480
5480
}
5481
5481
l -> p = NULL ;
5482
5482
l -> size = -1 ;
0 commit comments