Browse Source

Z991239-385 #comment 强迫症犯了

gifur 5 years ago
parent
commit
7e51749177
3 changed files with 4 additions and 4 deletions
  1. 2 2
      libtoolkit/array.h
  2. 1 1
      libtoolkit/shm_array.c
  3. 1 1
      libtoolkit/shm_array.h

+ 2 - 2
libtoolkit/array.h

@@ -28,9 +28,9 @@ struct array_header_t {
     int elt_size;
     /** The number of active elements in the array */
     int nelts;
-    /** The number of elements allocated in the array */
+    /** The number of elements already allocated in the array */
     int nalloc;
-    /** The elements in the array */
+    /** The elements in the array, start address.*/
     char *elts;
 };
 

+ 1 - 1
libtoolkit/shm_array.c

@@ -40,7 +40,7 @@ TOOLKIT_API void *shm_array_push(array_header_t *arr)
 	return arr->elts + (arr->elt_size * (arr->nelts++));
 }
 
-TOOLKIT_API void shm_array_cat(array_header_t *dst,const array_header_t *src)
+TOOLKIT_API void shm_array_cat(array_header_t *dst, const array_header_t *src)
 {
 	int elt_size = dst->elt_size;
 	if (dst->nelts + src->nelts > dst->nalloc) {

+ 1 - 1
libtoolkit/shm_array.h

@@ -18,7 +18,7 @@ TOOLKIT_API void *shm_array_push(array_header_t *arr);
 
 #define SHM_ARRAY_PUSH(ary,type) (*((type *)shm_array_push(ary)))
 
-TOOLKIT_API void shm_array_cat(array_header_t *dst,const array_header_t *src);
+TOOLKIT_API void shm_array_cat(array_header_t *dst, const array_header_t *src);
 TOOLKIT_API array_header_t * shm_array_copy(const array_header_t *arr);