Changeset 5530 for trunk/psLib/src/types
- Timestamp:
- Nov 16, 2005, 1:07:10 PM (21 years ago)
- Location:
- trunk/psLib/src/types
- Files:
-
- 4 edited
-
psArray.c (modified) (3 diffs)
-
psArray.h (modified) (2 diffs)
-
psPixels.c (modified) (3 diffs)
-
psPixels.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/types/psArray.c
r5216 r5530 9 9 * @author Ross Harman, MHPCC 10 10 * 11 * @version $Revision: 1. 39$ $Name: not supported by cvs2svn $12 * @date $Date: 2005-1 0-01 02:22:15 $11 * @version $Revision: 1.40 $ $Name: not supported by cvs2svn $ 12 * @date $Date: 2005-11-16 23:06:35 $ 13 13 * 14 14 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 63 63 psMemSetDeallocator(psArr, (psFreeFunc) arrayFree); 64 64 65 *(long*)&psArr->nalloc = nalloc;65 P_PSARRAY_SET_NALLOC(psArr,nalloc); 66 66 psArr->n = nalloc; 67 67 … … 87 87 // Realloc after decrementation to avoid accessing freed array elements 88 88 in->data = psRealloc(in->data, nalloc * sizeof(psPtr)); 89 *(long*)&in->nalloc = nalloc;89 P_PSARRAY_SET_NALLOC(in,nalloc); 90 90 } 91 91 -
trunk/psLib/src/types/psArray.h
r5454 r5530 11 11 * @author Ross Harman, MHPCC 12 12 * 13 * @version $Revision: 1.3 4$ $Name: not supported by cvs2svn $14 * @date $Date: 2005-1 0-29 00:05:53$13 * @version $Revision: 1.35 $ $Name: not supported by cvs2svn $ 14 * @date $Date: 2005-11-16 23:06:35 $ 15 15 * 16 16 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 40 40 psArray; 41 41 42 /*****************************************************************************/ 42 #define P_PSARRAY_SET_NALLOC(vec,n) *(long*)&vec->nalloc = n 43 43 44 /* FUNCTION PROTOTYPES*/44 /*****************************************************************************/ 45 45 46 /*****************************************************************************/46 /* FUNCTION PROTOTYPES */ 47 47 48 /** Checks the type of a particular pointer. 49 * 50 * Uses the appropriate deallocation function in psMemBlock to check the ptr datatype. 51 * 52 * @return bool: True if the pointer matches a psArray structure, false otherwise. 53 */ 54 bool psMemCheckArray( 55 psPtr ptr ///< the pointer whose type to check 56 ) 57 ; 48 /*****************************************************************************/ 49 50 /** Checks the type of a particular pointer. 51 * 52 * Uses the appropriate deallocation function in psMemBlock to check the ptr datatype. 53 * 54 * @return bool: True if the pointer matches a psArray structure, false otherwise. 55 */ 56 bool psMemCheckArray( 57 psPtr ptr ///< the pointer whose type to check 58 ) 59 ; 58 60 59 61 -
trunk/psLib/src/types/psPixels.c
r5214 r5530 7 7 * @author Robert DeSonia, MHPCC 8 8 * 9 * @version $Revision: 1.2 0$ $Name: not supported by cvs2svn $10 * @date $Date: 2005-1 0-01 00:14:17$9 * @version $Revision: 1.21 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2005-11-16 23:06:35 $ 11 11 * 12 12 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 66 66 } 67 67 out->n = nalloc; 68 *(long*)&out->nalloc = nalloc;68 P_PSPIXELS_SET_NALLOC(out,nalloc); 69 69 70 70 psMemSetDeallocator(out, (psFreeFunc)pixelsFree); … … 94 94 } 95 95 96 *(long*)&pixels->nalloc = nalloc;96 P_PSPIXELS_SET_NALLOC(pixels,nalloc); 97 97 98 98 if (pixels->n > pixels->nalloc) { -
trunk/psLib/src/types/psPixels.h
r5214 r5530 7 7 * @author Robert DeSonia, MHPCC 8 8 * 9 * @version $Revision: 1.1 6$ $Name: not supported by cvs2svn $10 * @date $Date: 2005-1 0-01 00:14:17$9 * @version $Revision: 1.17 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2005-11-16 23:06:35 $ 11 11 * 12 12 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 48 48 psPixels; 49 49 50 #define P_PSPIXELS_SET_NALLOC(pix,n) *(long*)&pix->nalloc = n 50 51 51 /** Allocates a new psPixels structure52 *53 * @return psPixels* new psPixels54 */55 psPixels* psPixelsAlloc(56 long nalloc ///< the size of the coordinate vectors57 )58 ;52 /** Allocates a new psPixels structure 53 * 54 * @return psPixels* new psPixels 55 */ 56 psPixels* psPixelsAlloc( 57 long nalloc ///< the size of the coordinate vectors 58 ) 59 ; 59 60 60 61 /** Checks the type of a particular pointer.
Note:
See TracChangeset
for help on using the changeset viewer.
