* Copy nitems array elements from srcptr to destptr * * destptr: starting destination location (must be enough room!) * nitems: number of array elements to copy (>= 0) * srcptr: starting location in source array * offset: 0-based linear element number of first element (the one at *srcptr) * nullbitmap: start of source array's null bitmap, or NULL if none * typlen, typbyval, typalign: storag
| 4823 | * NB: this does not take care of setting up the destination's null bitmap! |
| 4824 | */ |
| 4825 | static int |
| 4826 | array_copy(char *destptr, int nitems, |
| 4827 | char *srcptr, int offset, bits8 *nullbitmap, |
| 4828 | int typlen, bool typbyval, char typalign) |
| 4829 | { |
| 4830 | int numbytes; |
| 4831 | |
| 4832 | numbytes = array_nelems_size(srcptr, offset, nullbitmap, nitems, |
| 4833 | typlen, typbyval, typalign); |
| 4834 | memcpy(destptr, srcptr, numbytes); |
| 4835 | return numbytes; |
| 4836 | } |
| 4837 | |
| 4838 | /* |
| 4839 | * Copy nitems null-bitmap bits from source to destination |
no test coverage detected