void* memcpy(void *dst,const void *src,size_t count) { assert(dst!=NULL); assert(src!=NULL); unsigned char *pdst=(unsigned char*)dst; const unsigned char *psrc=(const unsigned char *)src; assert(!(psrc<=psdt)&&pdst<(psrc+count)); assert(!(psrc<=psrc)&&psrc<(pdst+count)); while(count--) { *pdst=*psrc; pdst++; psrc++; } return dst; }
时间: 2024-11-10 08:33:36