Changeset 5298:a0d70da17a74 in roaraudio


Ignore:
Timestamp:
11/25/11 03:14:22 (8 years ago)
Author:
phi
Branch:
default
Message:

converted roar_buffer_next() to a function, added roar_buffer_moveinto() (See: #126)

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • include/libroar/buffer.h

    r5297 r5298  
    6161}; 
    6262 
    63 #define roar_buffer_next(a)    roar_buffer_delete(*(a), (a)) 
    64  
    6563#define roar_buffer_new(a,len) roar_buffer_new_data((a), (len), NULL) 
    6664 
     
    6967int roar_buffer_new_no_ma(struct roar_buffer ** buf, size_t len, void * data) _LIBROAR_BUFFER_STDATTRS; // no internal malloc 
    7068int roar_buffer_delete   (struct roar_buffer *  buf, struct roar_buffer ** next) _LIBROAR_BUFFER_STDATTRS; 
     69int roar_buffer_next     (struct roar_buffer ** buf) _LIBROAR_BUFFER_STDATTRS; 
    7170int roar_buffer_add      (struct roar_buffer *  buf, struct roar_buffer *  next) _LIBROAR_BUFFER_STDATTRS; 
     71int roar_buffer_moveinto (struct roar_buffer *  buf, struct roar_buffer *  next) _LIBROAR_BUFFER_STDATTRS; 
    7272 
    7373int roar_buffer_ref      (struct roar_buffer *  buf) _LIBROAR_ATTR_NONNULL_ALL; 
  • libroar/buffer.c

    r5297 r5298  
    259259} 
    260260 
     261int roar_buffer_next     (struct roar_buffer ** buf) { 
     262 return roar_buffer_delete(*buf, buf); 
     263} 
     264 
    261265int roar_buffer_add      (struct roar_buffer * buf, struct roar_buffer *  next) { 
     266 return roar_buffer_moveinto(buf, next); 
     267} 
     268 
     269int roar_buffer_moveinto (struct roar_buffer * buf, struct roar_buffer *  next) { 
    262270 unsigned int deep = 0; 
    263271 
Note: See TracChangeset for help on using the changeset viewer.