mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 10:26:02 +00:00 
			
		
		
		
	PyUnicode_KIND() uses _Py_RVALUE() (#100060)
The PyUnicode_KIND() macro is modified to use _Py_RVALUE(), so it can no longer be used as a l-value.
This commit is contained in:
		
							parent
							
								
									679efbb080
								
							
						
					
					
						commit
						abbe4482ab
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		|  | @ -231,7 +231,7 @@ enum PyUnicode_Kind { | |||
| // new compiler warnings on "kind < PyUnicode_KIND(str)" (compare signed and
 | ||||
| // unsigned numbers) where kind type is an int or on
 | ||||
| // "unsigned int kind = PyUnicode_KIND(str)" (cast signed to unsigned).
 | ||||
| #define PyUnicode_KIND(op) (_PyASCIIObject_CAST(op)->state.kind) | ||||
| #define PyUnicode_KIND(op) _Py_RVALUE(_PyASCIIObject_CAST(op)->state.kind) | ||||
| 
 | ||||
| /* Return a void pointer to the raw unicode buffer. */ | ||||
| static inline void* _PyUnicode_COMPACT_DATA(PyObject *op) { | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Victor Stinner
						Victor Stinner