mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Updated malloc/calloc/realloc/free deprecation of old helper functions. Add checks to prevent incorrect alignment on types when using malloc. Better errors from $assert. Added @deprecated. Fixed issue using named arguments after varargs.
This commit is contained in:
committed by
Christoffer Lerno
parent
8ad8af861e
commit
dd4edfb747
@@ -164,7 +164,7 @@ fn void* callback(void* arg) @private
|
||||
|
||||
fn void! NativeThread.create(NativeThread* thread, ThreadFn thread_fn, void* arg)
|
||||
{
|
||||
PosixThreadData *thread_data = mem::alloc(PosixThreadData);
|
||||
PosixThreadData *thread_data = malloc(PosixThreadData);
|
||||
*thread_data = { .thread_fn = thread_fn, .arg = arg };
|
||||
if (pthread_create(thread, null, &callback, thread_data) != 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user