mirror of
https://github.com/odin-lang/Odin.git
synced 2026-01-06 13:07:59 +00:00
Deprecate opaque in favour of #opaque in the core library
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
package dynlib
|
||||
|
||||
Library :: opaque rawptr;
|
||||
Library :: #opaque rawptr;
|
||||
|
||||
@@ -607,7 +607,7 @@ write_type_writer :: proc(w: io.Writer, ti: ^Type_Info) -> (n: int) {
|
||||
n += _n(io.write_byte(w, ']'));
|
||||
|
||||
case Type_Info_Opaque:
|
||||
n += write_string(w, "opaque ");
|
||||
n += write_string(w, "#opaque ");
|
||||
n += write_type(w, info.elem);
|
||||
|
||||
case Type_Info_Simd_Vector:
|
||||
|
||||
@@ -350,7 +350,7 @@ print_type :: proc "contextless" (ti: ^Type_Info) {
|
||||
print_byte(']');
|
||||
|
||||
case Type_Info_Opaque:
|
||||
print_string("opaque ");
|
||||
print_string("#opaque ");
|
||||
print_type(info.elem);
|
||||
|
||||
case Type_Info_Simd_Vector:
|
||||
|
||||
@@ -14,44 +14,44 @@ PTHREAD_ONCE_SIZE :: 8;
|
||||
PTHREAD_RWLOCK_SIZE :: 192;
|
||||
PTHREAD_RWLOCKATTR_SIZE :: 16;
|
||||
|
||||
pthread_t :: opaque u64;
|
||||
pthread_t :: #opaque u64;
|
||||
|
||||
pthread_attr_t :: opaque struct #align 16 {
|
||||
pthread_attr_t :: #opaque struct #align 16 {
|
||||
sig: c.long,
|
||||
_: [PTHREAD_ATTR_SIZE] c.char,
|
||||
};
|
||||
|
||||
pthread_cond_t :: opaque struct #align 16 {
|
||||
pthread_cond_t :: #opaque struct #align 16 {
|
||||
sig: c.long,
|
||||
_: [PTHREAD_COND_SIZE] c.char,
|
||||
};
|
||||
|
||||
pthread_condattr_t :: opaque struct #align 16 {
|
||||
pthread_condattr_t :: #opaque struct #align 16 {
|
||||
sig: c.long,
|
||||
_: [PTHREAD_CONDATTR_SIZE] c.char,
|
||||
};
|
||||
|
||||
pthread_mutex_t :: opaque struct #align 16 {
|
||||
pthread_mutex_t :: #opaque struct #align 16 {
|
||||
sig: c.long,
|
||||
_: [PTHREAD_MUTEX_SIZE] c.char,
|
||||
};
|
||||
|
||||
pthread_mutexattr_t :: opaque struct #align 16 {
|
||||
pthread_mutexattr_t :: #opaque struct #align 16 {
|
||||
sig: c.long,
|
||||
_: [PTHREAD_MUTEXATTR_SIZE] c.char,
|
||||
};
|
||||
|
||||
pthread_once_t :: opaque struct #align 16 {
|
||||
pthread_once_t :: #opaque struct #align 16 {
|
||||
sig: c.long,
|
||||
_: [PTHREAD_ONCE_SIZE] c.char,
|
||||
};
|
||||
|
||||
pthread_rwlock_t :: opaque struct #align 16 {
|
||||
pthread_rwlock_t :: #opaque struct #align 16 {
|
||||
sig: c.long,
|
||||
_: [PTHREAD_RWLOCK_SIZE] c.char,
|
||||
};
|
||||
|
||||
pthread_rwlockattr_t :: opaque struct #align 16 {
|
||||
pthread_rwlockattr_t :: #opaque struct #align 16 {
|
||||
sig: c.long,
|
||||
_: [PTHREAD_RWLOCKATTR_SIZE] c.char,
|
||||
};
|
||||
|
||||
@@ -26,32 +26,32 @@ when size_of(int) == 8 {
|
||||
PTHREAD_BARRIER_T_SIZE :: 20;
|
||||
}
|
||||
|
||||
pthread_cond_t :: opaque struct #align 16 {
|
||||
pthread_cond_t :: #opaque struct #align 16 {
|
||||
_: [PTHREAD_COND_T_SIZE] c.char,
|
||||
};
|
||||
pthread_mutex_t :: opaque struct #align 16 {
|
||||
pthread_mutex_t :: #opaque struct #align 16 {
|
||||
_: [PTHREAD_MUTEX_T_SIZE] c.char,
|
||||
};
|
||||
pthread_rwlock_t :: opaque struct #align 16 {
|
||||
pthread_rwlock_t :: #opaque struct #align 16 {
|
||||
_: [PTHREAD_RWLOCK_T_SIZE] c.char,
|
||||
};
|
||||
pthread_barrier_t :: opaque struct #align 16 {
|
||||
pthread_barrier_t :: #opaque struct #align 16 {
|
||||
_: [PTHREAD_BARRIER_T_SIZE] c.char,
|
||||
};
|
||||
|
||||
pthread_attr_t :: opaque struct #align 16 {
|
||||
pthread_attr_t :: #opaque struct #align 16 {
|
||||
_: [PTHREAD_ATTR_T_SIZE] c.char,
|
||||
};
|
||||
pthread_condattr_t :: opaque struct #align 16 {
|
||||
pthread_condattr_t :: #opaque struct #align 16 {
|
||||
_: [PTHREAD_CONDATTR_T_SIZE] c.char,
|
||||
};
|
||||
pthread_mutexattr_t :: opaque struct #align 16 {
|
||||
pthread_mutexattr_t :: #opaque struct #align 16 {
|
||||
_: [PTHREAD_MUTEXATTR_T_SIZE] c.char,
|
||||
};
|
||||
pthread_rwlockattr_t :: opaque struct #align 16 {
|
||||
pthread_rwlockattr_t :: #opaque struct #align 16 {
|
||||
_: [PTHREAD_RWLOCKATTR_T_SIZE] c.char,
|
||||
};
|
||||
pthread_barrierattr_t :: opaque struct #align 16 {
|
||||
pthread_barrierattr_t :: #opaque struct #align 16 {
|
||||
_: [PTHREAD_BARRIERATTR_T_SIZE] c.char,
|
||||
};
|
||||
|
||||
|
||||
@@ -33,32 +33,32 @@ when size_of(int) == 8 {
|
||||
PTHREAD_BARRIER_T_SIZE :: 20;
|
||||
}
|
||||
|
||||
pthread_cond_t :: opaque struct #align 16 {
|
||||
pthread_cond_t :: #opaque struct #align 16 {
|
||||
_: [PTHREAD_COND_T_SIZE] c.char,
|
||||
};
|
||||
pthread_mutex_t :: opaque struct #align 16 {
|
||||
pthread_mutex_t :: #opaque struct #align 16 {
|
||||
_: [PTHREAD_MUTEX_T_SIZE] c.char,
|
||||
};
|
||||
pthread_rwlock_t :: opaque struct #align 16 {
|
||||
pthread_rwlock_t :: #opaque struct #align 16 {
|
||||
_: [PTHREAD_RWLOCK_T_SIZE] c.char,
|
||||
};
|
||||
pthread_barrier_t :: opaque struct #align 16 {
|
||||
pthread_barrier_t :: #opaque struct #align 16 {
|
||||
_: [PTHREAD_BARRIER_T_SIZE] c.char,
|
||||
};
|
||||
|
||||
pthread_attr_t :: opaque struct #align 16 {
|
||||
pthread_attr_t :: #opaque struct #align 16 {
|
||||
_: [PTHREAD_ATTR_T_SIZE] c.char,
|
||||
};
|
||||
pthread_condattr_t :: opaque struct #align 16 {
|
||||
pthread_condattr_t :: #opaque struct #align 16 {
|
||||
_: [PTHREAD_CONDATTR_T_SIZE] c.char,
|
||||
};
|
||||
pthread_mutexattr_t :: opaque struct #align 16 {
|
||||
pthread_mutexattr_t :: #opaque struct #align 16 {
|
||||
_: [PTHREAD_MUTEXATTR_T_SIZE] c.char,
|
||||
};
|
||||
pthread_rwlockattr_t :: opaque struct #align 16 {
|
||||
pthread_rwlockattr_t :: #opaque struct #align 16 {
|
||||
_: [PTHREAD_RWLOCKATTR_T_SIZE] c.char,
|
||||
};
|
||||
pthread_barrierattr_t :: opaque struct #align 16 {
|
||||
pthread_barrierattr_t :: #opaque struct #align 16 {
|
||||
_: [PTHREAD_BARRIERATTR_T_SIZE] c.char,
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user