mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 02:15:10 +00:00 
			
		
		
		
	 66b7973c1b
			
		
	
	
		66b7973c1b
		
			
		
	
	
	
	
		
			
			* Add _PyWarnings_InitState() which only initializes the _warnings module state (tstate->interp->warnings) without creating a module object * Py_InitializeFromConfig() now calls _PyWarnings_InitState() instead of _PyWarnings_Init() * Rename also private functions of _warnings.c to avoid confusion between the public C API and the private C API.
		
			
				
	
	
		
			25 lines
		
	
	
	
		
			633 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			25 lines
		
	
	
	
		
			633 B
		
	
	
	
		
			C
		
	
	
	
	
	
| #ifndef Py_INTERNAL_WARNINGS_H
 | |
| #define Py_INTERNAL_WARNINGS_H
 | |
| #ifdef __cplusplus
 | |
| extern "C" {
 | |
| #endif
 | |
| 
 | |
| #ifndef Py_BUILD_CORE
 | |
| #  error "this header requires Py_BUILD_CORE define"
 | |
| #endif
 | |
| 
 | |
| struct _warnings_runtime_state {
 | |
|     /* Both 'filters' and 'onceregistry' can be set in warnings.py;
 | |
|        get_warnings_attr() will reset these variables accordingly. */
 | |
|     PyObject *filters;  /* List */
 | |
|     PyObject *once_registry;  /* Dict */
 | |
|     PyObject *default_action; /* String */
 | |
|     long filters_version;
 | |
| };
 | |
| 
 | |
| extern PyStatus _PyWarnings_InitState(PyThreadState *tstate);
 | |
| 
 | |
| #ifdef __cplusplus
 | |
| }
 | |
| #endif
 | |
| #endif /* !Py_INTERNAL_WARNINGS_H */
 |