Compare commits
	
		
			3 commits
		
	
	
		
			c06bb51cdc
			...
			6022bdee92
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|   | 6022bdee92 | ||
|   | ea100383d7 | ||
|   | eb4b11dda7 | 
					 3 changed files with 9 additions and 3 deletions
				
			
		
							
								
								
									
										3
									
								
								Makefile
									
										
									
									
									
								
							
							
						
						
									
										3
									
								
								Makefile
									
										
									
									
									
								
							|  | @ -57,6 +57,9 @@ asm: $(ASMS) $(OBJECTS) | |||
| 	wc -l $(ASMS) | ||||
| 	size $(OBJECTS) | ||||
| 
 | ||||
| tidy: | ||||
| 	@clang-tidy $(C_SOURCES) -- $(CFLAGS) | ||||
| 
 | ||||
| format: | ||||
| 	clang-format -i $(C_SOURCES) $(C_HEADERS) | ||||
| 
 | ||||
|  |  | |||
|  | @ -40,9 +40,9 @@ rb_init(struct RingBuf *rb, rb_size_t capacity, ALLOC_T malloc_fn, | |||
| } | ||||
| 
 | ||||
| void | ||||
| rb_destroy(struct RingBuf *rb, void(free)()) | ||||
| rb_destroy(struct RingBuf *rb, FREE_T free_fn) | ||||
| { | ||||
|   free(rb->buffer); | ||||
|   free_fn(rb->buffer); | ||||
| } | ||||
| 
 | ||||
| void | ||||
|  |  | |||
|  | @ -12,6 +12,9 @@ typedef void *(*ALLOC_T)(rb_size_t); | |||
| /** Signature of memcpy */ | ||||
| typedef void *(*MEMCPY_T)(void *, const void *, rb_size_t); | ||||
| 
 | ||||
| /** Signature of free */ | ||||
| typedef void (*FREE_T)(void *); | ||||
| 
 | ||||
| /**
 | ||||
|  * @brief Ring buffer, also known as circular buffer. | ||||
|  */ | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue