Changeset 672 for trunk/psLib/src/collections/psVector.c
- Timestamp:
- May 13, 2004, 1:36:27 PM (22 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/collections/psVector.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/collections/psVector.c
r670 r672 19 19 * @author Ross Harman, MHPCC 20 20 * 21 * @version $Revision: 1. 3$ $Name: not supported by cvs2svn $22 * @date $Date: 2004-05-13 2 2:47:52$21 * @version $Revision: 1.4 $ $Name: not supported by cvs2svn $ 22 * @date $Date: 2004-05-13 23:36:27 $ 23 23 * 24 24 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 75 75 } 76 76 77 if (elemType == PS_TYPE_PTR) { 78 elementSize = sizeof(void*); 79 } else { 80 elementSize = PSELEMTYPE_SIZEOF(elemType); 81 } 77 elementSize = PSELEMTYPE_SIZEOF(elemType); 82 78 83 79 // Create vector struct … … 102 98 // Invalid nalloc 103 99 if(nalloc < 1) { 104 psError(__func__, " : Line %d - Invalid value for nalloc. nalloc: %d\n", __LINE__, nalloc);100 psError(__func__, "Invalid value for nalloc (%d)\n", nalloc); 105 101 return NULL; 106 102 } 107 103 108 if (elemType == PS_TYPE_PTR) { 109 elementSize = sizeof(void*); 110 } else { 111 elementSize = PSELEMTYPE_SIZEOF(elemType); 112 } 104 elementSize = PSELEMTYPE_SIZEOF(elemType); 113 105 114 106 … … 137 129 } 138 130 139 if (psVec->type.type == PS_TYPE_PTR) { 140 psLogMsg(__func__,PS_LOG_WARN,"psVectorFree was called with a void* vector. " 141 "Referenced of pointers was not freed."); 142 psVoidPtrVectorFree(psVec,NULL); 143 } else { 144 psFree(psVec->vec.v); 145 psFree(psVec); 146 } 131 psFree(psVec->vec.v); 132 psFree(psVec); 147 133 } 148 134
Note:
See TracChangeset
for help on using the changeset viewer.
