mirror of
				https://github.com/explosion/spaCy.git
				synced 2025-11-04 09:57:26 +03:00 
			
		
		
		
	Squelch compiler warnings
This commit is contained in:
		
							parent
							
								
									93ab888d1d
								
							
						
					
					
						commit
						4382f175b3
					
				| 
						 | 
					@ -366,6 +366,7 @@ cdef class Vocab:
 | 
				
			||||||
        cdef size_t st
 | 
					        cdef size_t st
 | 
				
			||||||
        cdef size_t addr
 | 
					        cdef size_t addr
 | 
				
			||||||
        cdef hash_t key
 | 
					        cdef hash_t key
 | 
				
			||||||
 | 
					        cdef LexemeC* lexeme = NULL
 | 
				
			||||||
        for key, addr in self._by_hash.items():
 | 
					        for key, addr in self._by_hash.items():
 | 
				
			||||||
            lexeme = <LexemeC*>addr
 | 
					            lexeme = <LexemeC*>addr
 | 
				
			||||||
            fp.write_from(&lexeme.orth, sizeof(lexeme.orth), 1)
 | 
					            fp.write_from(&lexeme.orth, sizeof(lexeme.orth), 1)
 | 
				
			||||||
| 
						 | 
					@ -398,10 +399,10 @@ cdef class Vocab:
 | 
				
			||||||
        '''
 | 
					        '''
 | 
				
			||||||
        fp = CFile(loc, 'rb',
 | 
					        fp = CFile(loc, 'rb',
 | 
				
			||||||
                on_open_error=lambda: IOError('LexemeCs file not found at %s' % loc))
 | 
					                on_open_error=lambda: IOError('LexemeCs file not found at %s' % loc))
 | 
				
			||||||
        cdef LexemeC* lexeme
 | 
					        cdef LexemeC* lexeme = NULL
 | 
				
			||||||
        cdef hash_t key
 | 
					        cdef hash_t key
 | 
				
			||||||
        cdef unicode py_str
 | 
					        cdef unicode py_str
 | 
				
			||||||
        cdef attr_t orth
 | 
					        cdef attr_t orth = 0
 | 
				
			||||||
        assert sizeof(orth) == sizeof(lexeme.orth)
 | 
					        assert sizeof(orth) == sizeof(lexeme.orth)
 | 
				
			||||||
        i = 0
 | 
					        i = 0
 | 
				
			||||||
        while True:
 | 
					        while True:
 | 
				
			||||||
| 
						 | 
					@ -438,10 +439,10 @@ cdef class Vocab:
 | 
				
			||||||
    def _deserialize_lexemes(self, CFile fp):
 | 
					    def _deserialize_lexemes(self, CFile fp):
 | 
				
			||||||
        '''Load the binary vocabulary data from the given CFile.
 | 
					        '''Load the binary vocabulary data from the given CFile.
 | 
				
			||||||
        '''
 | 
					        '''
 | 
				
			||||||
        cdef LexemeC* lexeme
 | 
					        cdef LexemeC* lexeme = NULL
 | 
				
			||||||
        cdef hash_t key
 | 
					        cdef hash_t key
 | 
				
			||||||
        cdef unicode py_str
 | 
					        cdef unicode py_str
 | 
				
			||||||
        cdef attr_t orth
 | 
					        cdef attr_t orth = 0
 | 
				
			||||||
        assert sizeof(orth) == sizeof(lexeme.orth)
 | 
					        assert sizeof(orth) == sizeof(lexeme.orth)
 | 
				
			||||||
        i = 0
 | 
					        i = 0
 | 
				
			||||||
        cdef int todo = fp.size
 | 
					        cdef int todo = fp.size
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user