| 955 | } |
| 956 | |
| 957 | void NULLC::ArrayCopy(NULLCAutoArray dst, NULLCAutoArray src) |
| 958 | { |
| 959 | if(dst.ptr == src.ptr) |
| 960 | return; |
| 961 | if(dst.typeID != src.typeID) |
| 962 | { |
| 963 | nullcThrowError("ERROR: destination element type '%s' doesn't match source element type '%s'", nullcGetTypeName(dst.typeID), nullcGetTypeName(src.typeID)); |
| 964 | return; |
| 965 | } |
| 966 | if(dst.len < src.len) |
| 967 | { |
| 968 | nullcThrowError("ERROR: destination array size '%d' is smaller than source array size '%s'", dst.len, src.len); |
| 969 | return; |
| 970 | } |
| 971 | memcpy(dst.ptr, src.ptr, nullcGetTypeSize(dst.typeID) * src.len); |
| 972 | } |
nothing calls this directly
no test coverage detected