mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 13:41:24 +00:00 
			
		
		
		
	Guido pointed out that all names in the sys module have no underscore,
This commit is contained in:
		
							parent
							
								
									39dce29365
								
							
						
					
					
						commit
						a2b6ad6e27
					
				
					 2 changed files with 6 additions and 5 deletions
				
			
		|  | @ -20,7 +20,7 @@ It is always available. | |||
|   \code{argv} has zero length. | ||||
| \end{datadesc} | ||||
| 
 | ||||
| \begin{datadesc}{byte_order} | ||||
| \begin{datadesc}{byteorder} | ||||
|   An indicator of the native byte order.  This will have the value | ||||
|   \code{'big'} on big-endian (most-signigicant byte first) platforms, | ||||
|   and \code{'little'} on little-endian (least-significant byte first) | ||||
|  |  | |||
|  | @ -461,14 +461,15 @@ _PySys_Init(void) | |||
| 		/* Assumes that longs are at least 2 bytes long.
 | ||||
| 		   Should be safe! */ | ||||
| 		unsigned long number = 1; | ||||
| 		char *value; | ||||
| 
 | ||||
| 		s = (char *) &number; | ||||
| 		if (s[0] == 0) | ||||
| 			PyDict_SetItemString(sysdict, "byte_order", | ||||
| 					     PyString_FromString("big")); | ||||
| 			value = "big"; | ||||
| 		else | ||||
| 			PyDict_SetItemString(sysdict, "byte_order", | ||||
| 					     PyString_FromString("little")); | ||||
| 			value = "little"; | ||||
| 		PyDict_SetItemString(sysdict, "byteorder", | ||||
| 				     PyString_FromString(value)); | ||||
| 	} | ||||
| #ifdef MS_COREDLL | ||||
| 	PyDict_SetItemString(sysdict, "dllhandle", | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Fred Drake
						Fred Drake