mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 13:41:24 +00:00 
			
		
		
		
	gh-91321: Add _Py_NULL macro (#92253)
Fix C++ compiler warnings: "zero as null pointer constant" (clang -Wzero-as-null-pointer-constant). * Add the _Py_NULL macro used by static inline functions to use nullptr in C++. * Replace NULL with nullptr in _testcppext.cpp.
This commit is contained in:
		
							parent
							
								
									456cd513e3
								
							
						
					
					
						commit
						551d02b3e6
					
				
					 6 changed files with 28 additions and 18 deletions
				
			
		|  | @ -29,6 +29,8 @@ | |||
|         '-Werror', | ||||
|         # Warn on old-style cast (C cast) like: (PyObject*)op | ||||
|         '-Wold-style-cast', | ||||
|         # Warn when using NULL rather than _Py_NULL in static inline functions | ||||
|         '-Wzero-as-null-pointer-constant', | ||||
|     ] | ||||
| else: | ||||
|     # Don't pass any compiler flag to MSVC | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Victor Stinner
						Victor Stinner