| 
									
										
										
										
											2024-01-10 08:04:41 +09:00
										 |  |  | #ifndef Py_INTERNAL_FREELIST_H
 | 
					
						
							|  |  |  | #define Py_INTERNAL_FREELIST_H
 | 
					
						
							|  |  |  | #ifdef __cplusplus
 | 
					
						
							|  |  |  | extern "C" { | 
					
						
							|  |  |  | #endif
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #ifndef Py_BUILD_CORE
 | 
					
						
							|  |  |  | #  error "this header requires Py_BUILD_CORE define"
 | 
					
						
							|  |  |  | #endif
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-01-11 00:47:13 +09:00
										 |  |  | #ifdef WITH_FREELISTS
 | 
					
						
							|  |  |  | // with freelists
 | 
					
						
							| 
									
										
										
										
											2024-01-10 08:04:41 +09:00
										 |  |  | #  define PyList_MAXFREELIST 80
 | 
					
						
							| 
									
										
										
										
											2024-01-11 00:47:13 +09:00
										 |  |  | #  define PyFloat_MAXFREELIST 100
 | 
					
						
							|  |  |  | #else
 | 
					
						
							|  |  |  | #  define PyList_MAXFREELIST 0
 | 
					
						
							|  |  |  | #  define PyFloat_MAXFREELIST 0
 | 
					
						
							| 
									
										
										
										
											2024-01-10 08:04:41 +09:00
										 |  |  | #endif
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | struct _Py_list_state { | 
					
						
							| 
									
										
										
										
											2024-01-11 00:47:13 +09:00
										 |  |  | #ifdef WITH_FREELISTS
 | 
					
						
							| 
									
										
										
										
											2024-01-10 08:04:41 +09:00
										 |  |  |     PyListObject *free_list[PyList_MAXFREELIST]; | 
					
						
							|  |  |  |     int numfree; | 
					
						
							|  |  |  | #endif
 | 
					
						
							|  |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-01-11 00:47:13 +09:00
										 |  |  | struct _Py_float_state { | 
					
						
							|  |  |  | #ifdef WITH_FREELISTS
 | 
					
						
							|  |  |  |     /* Special free list
 | 
					
						
							|  |  |  |        free_list is a singly-linked list of available PyFloatObjects, | 
					
						
							|  |  |  |        linked via abuse of their ob_type members. */ | 
					
						
							|  |  |  |     int numfree; | 
					
						
							|  |  |  |     PyFloatObject *free_list; | 
					
						
							|  |  |  | #endif
 | 
					
						
							|  |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-01-10 08:04:41 +09:00
										 |  |  | typedef struct _Py_freelist_state { | 
					
						
							| 
									
										
										
										
											2024-01-11 00:47:13 +09:00
										 |  |  |     struct _Py_float_state float_state; | 
					
						
							| 
									
										
										
										
											2024-01-11 08:51:51 +09:00
										 |  |  |     struct _Py_list_state list_state; | 
					
						
							| 
									
										
										
										
											2024-01-10 08:04:41 +09:00
										 |  |  | } _PyFreeListState; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #ifdef __cplusplus
 | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | #endif
 | 
					
						
							|  |  |  | #endif /* !Py_INTERNAL_FREELIST_H */
 |