more tyarrTemplate.h instancing out of core.h
This commit is contained in:
parent
a8c5dd6581
commit
02605fe271
32
src/core.h
32
src/core.h
@ -16,38 +16,6 @@
|
||||
#include "core/gstack.h"
|
||||
#include "core/harr.h"
|
||||
|
||||
#define I8Atom i8
|
||||
#define C8Atom u8
|
||||
#define I16Atom i16
|
||||
#define C16Atom u16
|
||||
#define I32Atom i32
|
||||
#define C32Atom u32
|
||||
#define F64Atom f64
|
||||
#define TYARR_SZ(T,IA) fsizeof(T##Arr, a, T##Atom, IA)
|
||||
#define TYARR_SZ2(T,IA) TYARR_SZ(T,IA)
|
||||
|
||||
#define TU I8
|
||||
#define TP(W,X) W##i8##X
|
||||
#include "core/tyarrTemplate.h"
|
||||
#define TU I16
|
||||
#define TP(W,X) W##i16##X
|
||||
#include "core/tyarrTemplate.h"
|
||||
#define TU I32
|
||||
#define TP(W,X) W##i32##X
|
||||
#include "core/tyarrTemplate.h"
|
||||
#define TU C8
|
||||
#define TP(W,X) W##c8##X
|
||||
#include "core/tyarrTemplate.h"
|
||||
#define TU C16
|
||||
#define TP(W,X) W##c16##X
|
||||
#include "core/tyarrTemplate.h"
|
||||
#define TU C32
|
||||
#define TP(W,X) W##c32##X
|
||||
#include "core/tyarrTemplate.h"
|
||||
#define TU F64
|
||||
#define TP(W,X) W##f64##X
|
||||
#include "core/tyarrTemplate.h"
|
||||
|
||||
#include "core/numarr.h"
|
||||
#include "core/chrarr.h"
|
||||
#include "core/fillarr.h"
|
||||
|
||||
@ -1,3 +1,18 @@
|
||||
#define C8Atom u8
|
||||
#define C16Atom u16
|
||||
#define C32Atom u32
|
||||
|
||||
#define TU C8
|
||||
#define TP(W,X) W##c8##X
|
||||
#include "tyarrTemplate.h"
|
||||
#define TU C16
|
||||
#define TP(W,X) W##c16##X
|
||||
#include "tyarrTemplate.h"
|
||||
#define TU C32
|
||||
#define TP(W,X) W##c32##X
|
||||
#include "tyarrTemplate.h"
|
||||
|
||||
|
||||
B m_str8(usz sz, char* s);
|
||||
B m_str8l(char* s);
|
||||
B m_str32(u32* s);
|
||||
|
||||
@ -1,3 +1,21 @@
|
||||
#define I8Atom i8
|
||||
#define I16Atom i16
|
||||
#define I32Atom i32
|
||||
#define F64Atom f64
|
||||
|
||||
#define TU I8
|
||||
#define TP(W,X) W##i8##X
|
||||
#include "tyarrTemplate.h"
|
||||
#define TU I16
|
||||
#define TP(W,X) W##i16##X
|
||||
#include "tyarrTemplate.h"
|
||||
#define TU I32
|
||||
#define TP(W,X) W##i32##X
|
||||
#include "tyarrTemplate.h"
|
||||
#define TU F64
|
||||
#define TP(W,X) W##f64##X
|
||||
#include "tyarrTemplate.h"
|
||||
|
||||
B m_cai32(usz ia, i32* a);
|
||||
B m_caf64(usz sz, f64* a);
|
||||
|
||||
|
||||
@ -23,6 +23,9 @@ static void decSh(Value* x) { if (RARE(prnk(x)>1)) ptr_dec(shObjP(x));}
|
||||
|
||||
// some array stuff
|
||||
|
||||
#define TYARR_SZ(T,IA) fsizeof(T##Arr, a, T##Atom, IA)
|
||||
#define TYARR_SZ2(T,IA) TYARR_SZ(T,IA)
|
||||
|
||||
#define WRAP(X,IA,MSG) ({ i64 wV=(i64)(X); u64 iaW=(IA); if(RARE((u64)wV >= iaW)) { if(wV<0) wV+= iaW; if((u64)wV >= iaW) {MSG;} }; (usz)wV; })
|
||||
|
||||
static inline void* m_arr(u64 sz, u8 type, usz ia) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user