[compat] Rename struct_(un)pack to compat_struct_(un)pack
This commit is contained in:
		
							parent
							
								
									d5ae6bb501
								
							
						
					
					
						commit
						edaa23f822
					
				
					 7 changed files with 42 additions and 42 deletions
				
			
		| 
						 | 
				
			
			@ -12,8 +12,8 @@ from ..compat import (
 | 
			
		|||
    compat_urlparse,
 | 
			
		||||
    compat_urllib_error,
 | 
			
		||||
    compat_urllib_parse_urlparse,
 | 
			
		||||
    struct_pack,
 | 
			
		||||
    struct_unpack,
 | 
			
		||||
    compat_struct_pack,
 | 
			
		||||
    compat_struct_unpack,
 | 
			
		||||
)
 | 
			
		||||
from ..utils import (
 | 
			
		||||
    encodeFilename,
 | 
			
		||||
| 
						 | 
				
			
			@ -31,13 +31,13 @@ class FlvReader(io.BytesIO):
 | 
			
		|||
 | 
			
		||||
    # Utility functions for reading numbers and strings
 | 
			
		||||
    def read_unsigned_long_long(self):
 | 
			
		||||
        return struct_unpack('!Q', self.read(8))[0]
 | 
			
		||||
        return compat_struct_unpack('!Q', self.read(8))[0]
 | 
			
		||||
 | 
			
		||||
    def read_unsigned_int(self):
 | 
			
		||||
        return struct_unpack('!I', self.read(4))[0]
 | 
			
		||||
        return compat_struct_unpack('!I', self.read(4))[0]
 | 
			
		||||
 | 
			
		||||
    def read_unsigned_char(self):
 | 
			
		||||
        return struct_unpack('!B', self.read(1))[0]
 | 
			
		||||
        return compat_struct_unpack('!B', self.read(1))[0]
 | 
			
		||||
 | 
			
		||||
    def read_string(self):
 | 
			
		||||
        res = b''
 | 
			
		||||
| 
						 | 
				
			
			@ -194,11 +194,11 @@ def build_fragments_list(boot_info):
 | 
			
		|||
 | 
			
		||||
 | 
			
		||||
def write_unsigned_int(stream, val):
 | 
			
		||||
    stream.write(struct_pack('!I', val))
 | 
			
		||||
    stream.write(compat_struct_pack('!I', val))
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def write_unsigned_int_24(stream, val):
 | 
			
		||||
    stream.write(struct_pack('!I', val)[1:])
 | 
			
		||||
    stream.write(compat_struct_pack('!I', val)[1:])
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def write_flv_header(stream):
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue