1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

cgen: add C fn memfreedup to cheaders.v (#6563)

This commit is contained in:
kalapalo 2020-10-05 07:14:41 -04:00 committed by GitHub
parent 5f07b255bd
commit 4b410534dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -407,6 +407,12 @@ void _vcleanup();
return ((r&0x1fffff)+((r>>21)&0x1fffff)+((r>>42)&0x1fffff))*_wynorm-3.0;
}
#endif
voidptr memdup(voidptr src, int sz);
voidptr memfreedup(voidptr ptr, voidptr src, int sz) {
free(ptr);
return memdup(src, sz);
}
'
c_builtin_types = '
//================================== builtin types ================================*/