mirror of
				https://github.com/python/cpython.git
				synced 2025-11-03 23:21:29 +00:00 
			
		
		
		
	gh-117431: Adapt bytes and bytearray .startswith() and .endswith() to Argument Clinic (#117495)
This change gives a significant speedup, as the METH_FASTCALL calling convention is now used.
This commit is contained in:
		
							parent
							
								
									1dc1521042
								
							
						
					
					
						commit
						595bb496b0
					
				
					 7 changed files with 324 additions and 61 deletions
				
			
		| 
						 | 
				
			
			@ -32,8 +32,12 @@ extern PyObject *_Py_bytes_rfind(const char *str, Py_ssize_t len, PyObject *args
 | 
			
		|||
extern PyObject *_Py_bytes_rindex(const char *str, Py_ssize_t len, PyObject *args);
 | 
			
		||||
extern PyObject *_Py_bytes_count(const char *str, Py_ssize_t len, PyObject *args);
 | 
			
		||||
extern int _Py_bytes_contains(const char *str, Py_ssize_t len, PyObject *arg);
 | 
			
		||||
extern PyObject *_Py_bytes_startswith(const char *str, Py_ssize_t len, PyObject *args);
 | 
			
		||||
extern PyObject *_Py_bytes_endswith(const char *str, Py_ssize_t len, PyObject *args);
 | 
			
		||||
extern PyObject *_Py_bytes_startswith(const char *str, Py_ssize_t len,
 | 
			
		||||
                                      PyObject *subobj, Py_ssize_t start,
 | 
			
		||||
                                      Py_ssize_t end);
 | 
			
		||||
extern PyObject *_Py_bytes_endswith(const char *str, Py_ssize_t len,
 | 
			
		||||
                                    PyObject *subobj, Py_ssize_t start,
 | 
			
		||||
                                    Py_ssize_t end);
 | 
			
		||||
 | 
			
		||||
/* The maketrans() static method. */
 | 
			
		||||
extern PyObject* _Py_bytes_maketrans(Py_buffer *frm, Py_buffer *to);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue