@@ -1907,7 +1907,7 @@ deepcopy(PyObject** object, PyObject* memo)
19071907
19081908 copy = call (
19091909 "copy" , "deepcopy" ,
1910- Py_BuildValue ( "OO" , * object , memo )
1910+ PyTuple_Pack ( 2 , * object , memo )
19111911 );
19121912 if (!copy )
19131913 return 0 ;
@@ -1968,7 +1968,7 @@ join_list(PyObject* list, PyObject* pattern)
19681968#else
19691969 result = call (
19701970 "string" , "join" ,
1971- Py_BuildValue ( "OO" , list , joiner )
1971+ PyTuple_Pack ( 2 , list , joiner )
19721972 );
19731973#endif
19741974 Py_DECREF (joiner );
@@ -2255,7 +2255,7 @@ pattern_subx(PatternObject* self, PyObject* template, PyObject* string,
22552255 /* not a literal; hand it over to the template compiler */
22562256 filter = call (
22572257 SRE_MODULE , "_subx" ,
2258- Py_BuildValue ( "OO" , self , template )
2258+ PyTuple_Pack ( 2 , self , template )
22592259 );
22602260 if (!filter )
22612261 return NULL ;
@@ -2321,7 +2321,7 @@ pattern_subx(PatternObject* self, PyObject* template, PyObject* string,
23212321 match = pattern_new_match (self , & state , 1 );
23222322 if (!match )
23232323 goto error ;
2324- args = Py_BuildValue ( "(O)" , match );
2324+ args = PyTuple_Pack ( 1 , match );
23252325 if (!args ) {
23262326 Py_DECREF (match );
23272327 goto error ;
@@ -2610,7 +2610,7 @@ match_expand(MatchObject* self, PyObject* args)
26102610 /* delegate to Python code */
26112611 return call (
26122612 SRE_MODULE , "_expand" ,
2613- Py_BuildValue ( "OOO" , self -> pattern , self , template )
2613+ PyTuple_Pack ( 3 , self -> pattern , self , template )
26142614 );
26152615}
26162616
0 commit comments