| 5947 | } |
| 5948 | |
| 5949 | static ArrayType * |
| 5950 | create_array_envelope(int ndims, int *dimv, int *lbsv, int nbytes, |
| 5951 | Oid elmtype, int dataoffset) |
| 5952 | { |
| 5953 | ArrayType *result; |
| 5954 | |
| 5955 | result = (ArrayType *) palloc0(nbytes); |
| 5956 | SET_VARSIZE(result, nbytes); |
| 5957 | result->ndim = ndims; |
| 5958 | result->dataoffset = dataoffset; |
| 5959 | result->elemtype = elmtype; |
| 5960 | memcpy(ARR_DIMS(result), dimv, ndims * sizeof(int)); |
| 5961 | memcpy(ARR_LBOUND(result), lbsv, ndims * sizeof(int)); |
| 5962 | |
| 5963 | return result; |
| 5964 | } |
| 5965 | |
| 5966 | static ArrayType * |
| 5967 | array_fill_internal(ArrayType *dims, ArrayType *lbs, |
no test coverage detected