fixed a lot of broken stuff
This commit is contained in:
parent
d62405ccff
commit
b627affbde
3
!TODO.md
Normal file
3
!TODO.md
Normal file
@ -0,0 +1,3 @@
|
||||
- add toString() to type descriptor
|
||||
- find better way to check typeId without hundreds of if() statements
|
||||
- update autoarr to use type descriptor
|
||||
65
make.error.log
Normal file
65
make.error.log
Normal file
@ -0,0 +1,65 @@
|
||||
C:/Program Files/Git/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: obj/DtsodV24.c.o:DtsodV24.c:(.rdata$.refptr.kerepTypeId_Null[.refptr.kerepTypeId_Null]+0x0): undefined reference to `kerepTypeId_Null'
|
||||
C:/Program Files/Git/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: obj/DtsodV24_deserialize.c.o:DtsodV24_deserialize.c:(.rdata$.refptr.kerepTypeId_AutoarrUnitypePtr[.refptr.kerepTypeId_AutoarrUnitypePtr]+0x0): undefined reference to `kerepTypeId_AutoarrUnitypePtr'
|
||||
C:/Program Files/Git/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: obj/DtsodV24_deserialize.c.o:DtsodV24_deserialize.c:(.rdata$.refptr.kerepTypeId_HashtablePtr[.refptr.kerepTypeId_HashtablePtr]+0x0): undefined reference to `kerepTypeId_HashtablePtr'
|
||||
C:/Program Files/Git/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: obj/DtsodV24_deserialize.c.o:DtsodV24_deserialize.c:(.rdata$.refptr.kerepTypeId_Int64[.refptr.kerepTypeId_Int64]+0x0): undefined reference to `kerepTypeId_Int64'
|
||||
C:/Program Files/Git/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: obj/DtsodV24_deserialize.c.o:DtsodV24_deserialize.c:(.rdata$.refptr.kerepTypeId_UInt64[.refptr.kerepTypeId_UInt64]+0x0): undefined reference to `kerepTypeId_UInt64'
|
||||
C:/Program Files/Git/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: obj/DtsodV24_deserialize.c.o:DtsodV24_deserialize.c:(.rdata$.refptr.kerepTypeId_Float64[.refptr.kerepTypeId_Float64]+0x0): undefined reference to `kerepTypeId_Float64'
|
||||
C:/Program Files/Git/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: obj/DtsodV24_deserialize.c.o:DtsodV24_deserialize.c:(.rdata$.refptr.kerepTypeId_Bool[.refptr.kerepTypeId_Bool]+0x0): undefined reference to `kerepTypeId_Bool'
|
||||
C:/Program Files/Git/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: obj/DtsodV24_deserialize.c.o:DtsodV24_deserialize.c:(.rdata$.refptr.kerepTypeId_CharPtr[.refptr.kerepTypeId_CharPtr]+0x0): undefined reference to `kerepTypeId_CharPtr'
|
||||
C:/Program Files/Git/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: obj/init.c.o:init.c:(.rdata$.refptr.kerepTypeId_StringBuilderPtr[.refptr.kerepTypeId_StringBuilderPtr]+0x0): undefined reference to `kerepTypeId_StringBuilderPtr'
|
||||
C:/Program Files/Git/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: obj/init.c.o:init.c:(.rdata$.refptr.kerepTypeId_StringBuilder[.refptr.kerepTypeId_StringBuilder]+0x0): undefined reference to `kerepTypeId_StringBuilder'
|
||||
C:/Program Files/Git/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: obj/init.c.o:init.c:(.rdata$.refptr.kerepTypeId_Hashtable[.refptr.kerepTypeId_Hashtable]+0x0): undefined reference to `kerepTypeId_Hashtable'
|
||||
C:/Program Files/Git/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: obj/init.c.o:init.c:(.rdata$.refptr.kerepTypeId_AutoarrKVPairPtr[.refptr.kerepTypeId_AutoarrKVPairPtr]+0x0): undefined reference to `kerepTypeId_AutoarrKVPairPtr'
|
||||
C:/Program Files/Git/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: obj/init.c.o:init.c:(.rdata$.refptr.kerepTypeId_AutoarrKVPair[.refptr.kerepTypeId_AutoarrKVPair]+0x0): undefined reference to `kerepTypeId_AutoarrKVPair'
|
||||
C:/Program Files/Git/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: obj/init.c.o:init.c:(.rdata$.refptr.kerepTypeId_KVPairPtr[.refptr.kerepTypeId_KVPairPtr]+0x0): undefined reference to `kerepTypeId_KVPairPtr'
|
||||
C:/Program Files/Git/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: obj/init.c.o:init.c:(.rdata$.refptr.kerepTypeId_KVPair[.refptr.kerepTypeId_KVPair]+0x0): undefined reference to `kerepTypeId_KVPair'
|
||||
C:/Program Files/Git/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: obj/init.c.o:init.c:(.rdata$.refptr.kerepTypeId_STNodePtr[.refptr.kerepTypeId_STNodePtr]+0x0): undefined reference to `kerepTypeId_STNodePtr'
|
||||
C:/Program Files/Git/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: obj/init.c.o:init.c:(.rdata$.refptr.kerepTypeId_STNode[.refptr.kerepTypeId_STNode]+0x0): undefined reference to `kerepTypeId_STNode'
|
||||
C:/Program Files/Git/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: obj/init.c.o:init.c:(.rdata$.refptr.kerepTypeId_AutoarrUnitype[.refptr.kerepTypeId_AutoarrUnitype]+0x0): undefined reference to `kerepTypeId_AutoarrUnitype'
|
||||
C:/Program Files/Git/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: obj/init.c.o:init.c:(.rdata$.refptr.kerepTypeId_UnitypePtr[.refptr.kerepTypeId_UnitypePtr]+0x0): undefined reference to `kerepTypeId_UnitypePtr'
|
||||
C:/Program Files/Git/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: obj/init.c.o:init.c:(.rdata$.refptr.kerepTypeId_Unitype[.refptr.kerepTypeId_Unitype]+0x0): undefined reference to `kerepTypeId_Unitype'
|
||||
C:/Program Files/Git/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: obj/init.c.o:init.c:(.rdata$.refptr.kerepTypeId_AutoarrUInt64Ptr[.refptr.kerepTypeId_AutoarrUInt64Ptr]+0x0): undefined reference to `kerepTypeId_AutoarrUInt64Ptr'
|
||||
C:/Program Files/Git/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: obj/init.c.o:init.c:(.rdata$.refptr.kerepTypeId_AutoarrInt64Ptr[.refptr.kerepTypeId_AutoarrInt64Ptr]+0x0): undefined reference to `kerepTypeId_AutoarrInt64Ptr'
|
||||
C:/Program Files/Git/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: obj/init.c.o:init.c:(.rdata$.refptr.kerepTypeId_AutoarrUInt32Ptr[.refptr.kerepTypeId_AutoarrUInt32Ptr]+0x0): undefined reference to `kerepTypeId_AutoarrUInt32Ptr'
|
||||
C:/Program Files/Git/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: obj/init.c.o:init.c:(.rdata$.refptr.kerepTypeId_AutoarrInt32Ptr[.refptr.kerepTypeId_AutoarrInt32Ptr]+0x0): undefined reference to `kerepTypeId_AutoarrInt32Ptr'
|
||||
C:/Program Files/Git/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: obj/init.c.o:init.c:(.rdata$.refptr.kerepTypeId_AutoarrUInt16Ptr[.refptr.kerepTypeId_AutoarrUInt16Ptr]+0x0): undefined reference to `kerepTypeId_AutoarrUInt16Ptr'
|
||||
C:/Program Files/Git/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: obj/init.c.o:init.c:(.rdata$.refptr.kerepTypeId_AutoarrInt16Ptr[.refptr.kerepTypeId_AutoarrInt16Ptr]+0x0): undefined reference to `kerepTypeId_AutoarrInt16Ptr'
|
||||
C:/Program Files/Git/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: obj/init.c.o:init.c:(.rdata$.refptr.kerepTypeId_AutoarrUInt8Ptr[.refptr.kerepTypeId_AutoarrUInt8Ptr]+0x0): undefined reference to `kerepTypeId_AutoarrUInt8Ptr'
|
||||
C:/Program Files/Git/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: obj/init.c.o:init.c:(.rdata$.refptr.kerepTypeId_AutoarrInt8Ptr[.refptr.kerepTypeId_AutoarrInt8Ptr]+0x0): undefined reference to `kerepTypeId_AutoarrInt8Ptr'
|
||||
C:/Program Files/Git/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: obj/init.c.o:init.c:(.rdata$.refptr.kerepTypeId_AutoarrFloat64Ptr[.refptr.kerepTypeId_AutoarrFloat64Ptr]+0x0): undefined reference to `kerepTypeId_AutoarrFloat64Ptr'
|
||||
C:/Program Files/Git/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: obj/init.c.o:init.c:(.rdata$.refptr.kerepTypeId_AutoarrFloat32Ptr[.refptr.kerepTypeId_AutoarrFloat32Ptr]+0x0): undefined reference to `kerepTypeId_AutoarrFloat32Ptr'
|
||||
C:/Program Files/Git/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: obj/init.c.o:init.c:(.rdata$.refptr.kerepTypeId_AutoarrBoolPtr[.refptr.kerepTypeId_AutoarrBoolPtr]+0x0): undefined reference to `kerepTypeId_AutoarrBoolPtr'
|
||||
C:/Program Files/Git/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: obj/init.c.o:init.c:(.rdata$.refptr.kerepTypeId_AutoarrCharPtr[.refptr.kerepTypeId_AutoarrCharPtr]+0x0): undefined reference to `kerepTypeId_AutoarrCharPtr'
|
||||
C:/Program Files/Git/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: obj/init.c.o:init.c:(.rdata$.refptr.kerepTypeId_AutoarrUInt64[.refptr.kerepTypeId_AutoarrUInt64]+0x0): undefined reference to `kerepTypeId_AutoarrUInt64'
|
||||
C:/Program Files/Git/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: obj/init.c.o:init.c:(.rdata$.refptr.kerepTypeId_AutoarrInt64[.refptr.kerepTypeId_AutoarrInt64]+0x0): undefined reference to `kerepTypeId_AutoarrInt64'
|
||||
C:/Program Files/Git/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: obj/init.c.o:init.c:(.rdata$.refptr.kerepTypeId_AutoarrUInt32[.refptr.kerepTypeId_AutoarrUInt32]+0x0): undefined reference to `kerepTypeId_AutoarrUInt32'
|
||||
C:/Program Files/Git/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: obj/init.c.o:init.c:(.rdata$.refptr.kerepTypeId_AutoarrInt32[.refptr.kerepTypeId_AutoarrInt32]+0x0): undefined reference to `kerepTypeId_AutoarrInt32'
|
||||
C:/Program Files/Git/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: obj/init.c.o:init.c:(.rdata$.refptr.kerepTypeId_AutoarrUInt16[.refptr.kerepTypeId_AutoarrUInt16]+0x0): undefined reference to `kerepTypeId_AutoarrUInt16'
|
||||
C:/Program Files/Git/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: obj/init.c.o:init.c:(.rdata$.refptr.kerepTypeId_AutoarrInt16[.refptr.kerepTypeId_AutoarrInt16]+0x0): undefined reference to `kerepTypeId_AutoarrInt16'
|
||||
C:/Program Files/Git/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: obj/init.c.o:init.c:(.rdata$.refptr.kerepTypeId_AutoarrUInt8[.refptr.kerepTypeId_AutoarrUInt8]+0x0): undefined reference to `kerepTypeId_AutoarrUInt8'
|
||||
C:/Program Files/Git/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: obj/init.c.o:init.c:(.rdata$.refptr.kerepTypeId_AutoarrInt8[.refptr.kerepTypeId_AutoarrInt8]+0x0): undefined reference to `kerepTypeId_AutoarrInt8'
|
||||
C:/Program Files/Git/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: obj/init.c.o:init.c:(.rdata$.refptr.kerepTypeId_AutoarrFloat64[.refptr.kerepTypeId_AutoarrFloat64]+0x0): undefined reference to `kerepTypeId_AutoarrFloat64'
|
||||
C:/Program Files/Git/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: obj/init.c.o:init.c:(.rdata$.refptr.kerepTypeId_AutoarrFloat32[.refptr.kerepTypeId_AutoarrFloat32]+0x0): undefined reference to `kerepTypeId_AutoarrFloat32'
|
||||
C:/Program Files/Git/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: obj/init.c.o:init.c:(.rdata$.refptr.kerepTypeId_AutoarrBool[.refptr.kerepTypeId_AutoarrBool]+0x0): undefined reference to `kerepTypeId_AutoarrBool'
|
||||
C:/Program Files/Git/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: obj/init.c.o:init.c:(.rdata$.refptr.kerepTypeId_AutoarrChar[.refptr.kerepTypeId_AutoarrChar]+0x0): undefined reference to `kerepTypeId_AutoarrChar'
|
||||
C:/Program Files/Git/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: obj/init.c.o:init.c:(.rdata$.refptr.kerepTypeId_UInt64Ptr[.refptr.kerepTypeId_UInt64Ptr]+0x0): undefined reference to `kerepTypeId_UInt64Ptr'
|
||||
C:/Program Files/Git/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: obj/init.c.o:init.c:(.rdata$.refptr.kerepTypeId_Int64Ptr[.refptr.kerepTypeId_Int64Ptr]+0x0): undefined reference to `kerepTypeId_Int64Ptr'
|
||||
C:/Program Files/Git/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: obj/init.c.o:init.c:(.rdata$.refptr.kerepTypeId_UInt32Ptr[.refptr.kerepTypeId_UInt32Ptr]+0x0): undefined reference to `kerepTypeId_UInt32Ptr'
|
||||
C:/Program Files/Git/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: obj/init.c.o:init.c:(.rdata$.refptr.kerepTypeId_Int32Ptr[.refptr.kerepTypeId_Int32Ptr]+0x0): undefined reference to `kerepTypeId_Int32Ptr'
|
||||
C:/Program Files/Git/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: obj/init.c.o:init.c:(.rdata$.refptr.kerepTypeId_UInt16Ptr[.refptr.kerepTypeId_UInt16Ptr]+0x0): undefined reference to `kerepTypeId_UInt16Ptr'
|
||||
C:/Program Files/Git/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: obj/init.c.o:init.c:(.rdata$.refptr.kerepTypeId_Int16Ptr[.refptr.kerepTypeId_Int16Ptr]+0x0): undefined reference to `kerepTypeId_Int16Ptr'
|
||||
C:/Program Files/Git/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: obj/init.c.o:init.c:(.rdata$.refptr.kerepTypeId_UInt8Ptr[.refptr.kerepTypeId_UInt8Ptr]+0x0): undefined reference to `kerepTypeId_UInt8Ptr'
|
||||
C:/Program Files/Git/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: obj/init.c.o:init.c:(.rdata$.refptr.kerepTypeId_Int8Ptr[.refptr.kerepTypeId_Int8Ptr]+0x0): undefined reference to `kerepTypeId_Int8Ptr'
|
||||
C:/Program Files/Git/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: obj/init.c.o:init.c:(.rdata$.refptr.kerepTypeId_Float64Ptr[.refptr.kerepTypeId_Float64Ptr]+0x0): undefined reference to `kerepTypeId_Float64Ptr'
|
||||
C:/Program Files/Git/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: obj/init.c.o:init.c:(.rdata$.refptr.kerepTypeId_Float32Ptr[.refptr.kerepTypeId_Float32Ptr]+0x0): undefined reference to `kerepTypeId_Float32Ptr'
|
||||
C:/Program Files/Git/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: obj/init.c.o:init.c:(.rdata$.refptr.kerepTypeId_BoolPtr[.refptr.kerepTypeId_BoolPtr]+0x0): undefined reference to `kerepTypeId_BoolPtr'
|
||||
C:/Program Files/Git/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: obj/init.c.o:init.c:(.rdata$.refptr.kerepTypeId_UInt32[.refptr.kerepTypeId_UInt32]+0x0): undefined reference to `kerepTypeId_UInt32'
|
||||
C:/Program Files/Git/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: obj/init.c.o:init.c:(.rdata$.refptr.kerepTypeId_Int32[.refptr.kerepTypeId_Int32]+0x0): undefined reference to `kerepTypeId_Int32'
|
||||
C:/Program Files/Git/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: obj/init.c.o:init.c:(.rdata$.refptr.kerepTypeId_UInt16[.refptr.kerepTypeId_UInt16]+0x0): undefined reference to `kerepTypeId_UInt16'
|
||||
C:/Program Files/Git/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: obj/init.c.o:init.c:(.rdata$.refptr.kerepTypeId_Int16[.refptr.kerepTypeId_Int16]+0x0): undefined reference to `kerepTypeId_Int16'
|
||||
C:/Program Files/Git/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: obj/init.c.o:init.c:(.rdata$.refptr.kerepTypeId_UInt8[.refptr.kerepTypeId_UInt8]+0x0): undefined reference to `kerepTypeId_UInt8'
|
||||
C:/Program Files/Git/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: obj/init.c.o:init.c:(.rdata$.refptr.kerepTypeId_Int8[.refptr.kerepTypeId_Int8]+0x0): undefined reference to `kerepTypeId_Int8'
|
||||
C:/Program Files/Git/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: obj/init.c.o:init.c:(.rdata$.refptr.kerepTypeId_Float32[.refptr.kerepTypeId_Float32]+0x0): undefined reference to `kerepTypeId_Float32'
|
||||
C:/Program Files/Git/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: obj/init.c.o:init.c:(.rdata$.refptr.kerepTypeId_Char[.refptr.kerepTypeId_Char]+0x0): undefined reference to `kerepTypeId_Char'
|
||||
collect2.exe: error: ld returned 1 exit status
|
||||
make: *** [Makefile:3: build_test] Error 1
|
||||
71
make.log
Normal file
71
make.log
Normal file
@ -0,0 +1,71 @@
|
||||
[3g
H H H H H H H H H H H H H H H H H H H H H H H H H H H H H H H H H H H H H H H H
[0;96m=============[build_test]=============
|
||||
[0;37m[0;94mclearing bin
|
||||
[0;37m[0;94mclearing obj
|
||||
[0;37m[0;96m-------------[compile_c]--------------
|
||||
[0;37m[0;94mcompiler: [0;37mgcc
|
||||
[0;37m[0;94mstandard: [0;37mc11
|
||||
[0;37m[0;94mwarnings: [0;37m-Wall -Wno-discarded-qualifiers
|
||||
[0;37m[0;94margs: [0;37m-O2
|
||||
[0;37m[0;94msources: [0;37msrc/Autoarr/Autoarr.c
|
||||
src/Autoarr/Autoarr_KVPair_exported.c
|
||||
src/Autoarr/Autoarr_Unitype_exported.c
|
||||
src/base/cptr.c
|
||||
src/base/errors.c
|
||||
src/base/init.c
|
||||
src/base/types.c
|
||||
src/base/unitype.c
|
||||
src/DtsodParser/DtsodV24.c
|
||||
src/DtsodParser/DtsodV24_deserialize.c
|
||||
src/DtsodParser/DtsodV24_exported.c
|
||||
src/DtsodParser/DtsodV24_serialize.c
|
||||
src/HashFunctions/hash.c
|
||||
src/Hashtable/Hashtable.c
|
||||
src/Hashtable/KeyValuePair.c
|
||||
src/SearchTree/SearchTree.c
|
||||
src/String/string.c
|
||||
src/String/StringBuilder.c tests/test_autoarr.c
|
||||
tests/test_dtsod.c
|
||||
tests/test_hashtable.c
|
||||
tests/test_hash_functions.c
|
||||
tests/test_marshalling.c
|
||||
tests/test_safethrow.c
|
||||
tests/test_searchtree.c
|
||||
tests/test_string.c
|
||||
[0;37m[0;91msome error happened
|
||||
[0;37m[0;91msome error happened
|
||||
[0;37m[0;91msome error happened
|
||||
[0;37m[0;91msome error happened
|
||||
[0;37m[0;91msome error happened
|
||||
[0;37m[0;91msome error happened
|
||||
[0;37m[0;91msome error happened
|
||||
[0;37m[0;91msome error happened
|
||||
[0;37m[0;91msome error happened
|
||||
[0;37m[0;96m------------[compile_cpp]-------------
|
||||
[0;37m[0;94mcompiler: [0;37mg++
|
||||
[0;37m[0;94mstandard: [0;37mc++17
|
||||
[0;37m[0;94mwarnings: [0;37m-Wall -Wno-unused-variable -Wno-return-type
|
||||
[0;37m[0;94margs: [0;37m-O2
|
||||
[0;37m[0;94msources: [0;37m tests/main.cpp
|
||||
[0;37m[0;96m----------------[link]----------------
|
||||
[0;37m[0;94margs: [0;37m-O2
|
||||
[0;37m[0;94moutfile: [0;37mbin/kerep.com
|
||||
[0;37m[0;94mobjects: [0;37mobj/Autoarr.c.o
|
||||
obj/Autoarr_KVPair_exported.c.o
|
||||
obj/Autoarr_Unitype_exported.c.o
|
||||
obj/cptr.c.o
|
||||
obj/DtsodV24_exported.c.o
|
||||
obj/errors.c.o
|
||||
obj/hash.c.o
|
||||
obj/init.c.o
|
||||
obj/KeyValuePair.c.o
|
||||
obj/main.cpp.o
|
||||
obj/string.c.o
|
||||
obj/StringBuilder.c.o
|
||||
obj/test_autoarr.c.o
|
||||
obj/test_dtsod.c.o
|
||||
obj/test_hash_functions.c.o
|
||||
obj/test_string.c.o
|
||||
obj/types.c.o
|
||||
obj/unitype.c.o
|
||||
[0;37m[0;91msome error happened
|
||||
[0;37m
|
||||
@ -20,35 +20,35 @@ Autoarr_declare(uint32)
|
||||
Autoarr_declare(int64)
|
||||
Autoarr_declare(uint64)
|
||||
|
||||
kerepType_declare(AutoarrChar);
|
||||
kerepType_declare(AutoarrBool);
|
||||
kerepType_declare(AutoarrFloat32);
|
||||
kerepType_declare(AutoarrFloat64);
|
||||
kerepType_declare(AutoarrInt8);
|
||||
kerepType_declare(AutoarrUInt8);
|
||||
kerepType_declare(AutoarrInt16);
|
||||
kerepType_declare(AutoarrUInt16);
|
||||
kerepType_declare(AutoarrInt32);
|
||||
kerepType_declare(AutoarrUInt32);
|
||||
kerepType_declare(AutoarrInt64);
|
||||
kerepType_declare(AutoarrUInt64);
|
||||
kerepTypeId_declare(kerepTypeId_AutoarrChar);
|
||||
kerepTypeId_declare(kerepTypeId_AutoarrBool);
|
||||
kerepTypeId_declare(kerepTypeId_AutoarrFloat32);
|
||||
kerepTypeId_declare(kerepTypeId_AutoarrFloat64);
|
||||
kerepTypeId_declare(kerepTypeId_AutoarrInt8);
|
||||
kerepTypeId_declare(kerepTypeId_AutoarrUInt8);
|
||||
kerepTypeId_declare(kerepTypeId_AutoarrInt16);
|
||||
kerepTypeId_declare(kerepTypeId_AutoarrUInt16);
|
||||
kerepTypeId_declare(kerepTypeId_AutoarrInt32);
|
||||
kerepTypeId_declare(kerepTypeId_AutoarrUInt32);
|
||||
kerepTypeId_declare(kerepTypeId_AutoarrInt64);
|
||||
kerepTypeId_declare(kerepTypeId_AutoarrUInt64);
|
||||
|
||||
kerepType_declare(AutoarrCharPtr);
|
||||
kerepType_declare(AutoarrBoolPtr);
|
||||
kerepType_declare(AutoarrFloat32Ptr);
|
||||
kerepType_declare(AutoarrFloat64Ptr);
|
||||
kerepType_declare(AutoarrInt8Ptr);
|
||||
kerepType_declare(AutoarrUInt8Ptr);
|
||||
kerepType_declare(AutoarrInt16Ptr);
|
||||
kerepType_declare(AutoarrUInt16Ptr);
|
||||
kerepType_declare(AutoarrInt32Ptr);
|
||||
kerepType_declare(AutoarrUInt32Ptr);
|
||||
kerepType_declare(AutoarrInt64Ptr);
|
||||
kerepType_declare(AutoarrUInt64Ptr);
|
||||
kerepTypeId_declare(kerepTypeId_AutoarrCharPtr);
|
||||
kerepTypeId_declare(kerepTypeId_AutoarrBoolPtr);
|
||||
kerepTypeId_declare(kerepTypeId_AutoarrFloat32Ptr);
|
||||
kerepTypeId_declare(kerepTypeId_AutoarrFloat64Ptr);
|
||||
kerepTypeId_declare(kerepTypeId_AutoarrInt8Ptr);
|
||||
kerepTypeId_declare(kerepTypeId_AutoarrUInt8Ptr);
|
||||
kerepTypeId_declare(kerepTypeId_AutoarrInt16Ptr);
|
||||
kerepTypeId_declare(kerepTypeId_AutoarrUInt16Ptr);
|
||||
kerepTypeId_declare(kerepTypeId_AutoarrInt32Ptr);
|
||||
kerepTypeId_declare(kerepTypeId_AutoarrUInt32Ptr);
|
||||
kerepTypeId_declare(kerepTypeId_AutoarrInt64Ptr);
|
||||
kerepTypeId_declare(kerepTypeId_AutoarrUInt64Ptr);
|
||||
|
||||
Autoarr_declare(Unitype)
|
||||
kerepType_declare(AutoarrUnitype);
|
||||
kerepType_declare(AutoarrUnitypePtr);
|
||||
kerepTypeId_declare(kerepTypeId_AutoarrUnitype);
|
||||
kerepTypeId_declare(kerepTypeId_AutoarrUnitypePtr);
|
||||
|
||||
// this function is injected in kerep_init()
|
||||
void __Autoarr_free_Unitype_(Autoarr(Unitype)* ar, bool freePtr);
|
||||
|
||||
@ -98,9 +98,9 @@ Maybe __ReadName(DeserializeSharedData* shared){
|
||||
case '}':
|
||||
if(!calledRecursively || nameStr.length!=0)
|
||||
safethrow_wrongchar(c,;);
|
||||
return SUCCESS(UniPtr(CharPtr,NULL));
|
||||
return SUCCESS(UniPtrHeap(kerepTypeId_CharPtr,NULL));
|
||||
case ':':
|
||||
return SUCCESS(UniPtr(CharPtr,string_extract(nameStr)));
|
||||
return SUCCESS(UniPtrHeap(kerepTypeId_CharPtr,string_extract(nameStr)));
|
||||
case '$':
|
||||
if(nameStr.length!=0)
|
||||
safethrow_wrongchar(c,;);
|
||||
@ -113,7 +113,7 @@ Maybe __ReadName(DeserializeSharedData* shared){
|
||||
}
|
||||
|
||||
if(nameStr.length>0) safethrow(ERR_ENDOFSTR,;);
|
||||
return SUCCESS(UniPtr(CharPtr,NULL));
|
||||
return SUCCESS(UniPtrHeap(kerepTypeId_CharPtr,NULL));
|
||||
}
|
||||
#define ReadName() __ReadName(shared)
|
||||
|
||||
@ -137,7 +137,7 @@ Maybe __ReadString(DeserializeSharedData* shared){
|
||||
}
|
||||
else {
|
||||
char* str=StringBuilder_build(b).ptr;
|
||||
return SUCCESS(UniPtr(CharPtr,str));
|
||||
return SUCCESS(UniPtrHeap(kerepTypeId_CharPtr,str));
|
||||
}
|
||||
}
|
||||
else {
|
||||
@ -157,13 +157,13 @@ Maybe __ReadList(DeserializeSharedData* shared){
|
||||
try(ReadValue((&readingList)), val, Autoarr_free(list, true))
|
||||
Autoarr_add(list,val.value);
|
||||
if (!readingList){
|
||||
if(val.value.type==Null)
|
||||
if(val.value.typeId==kerepTypeId_Null)
|
||||
Autoarr_pop(list);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return SUCCESS(UniPtr(AutoarrUnitypePtr,list));
|
||||
return SUCCESS(UniPtrHeap(kerepTypeId_AutoarrUnitypePtr,list));
|
||||
};
|
||||
#define ReadList() __ReadList(shared)
|
||||
|
||||
@ -275,7 +275,7 @@ Maybe __ReadValue(DeserializeSharedData* shared, bool* readingList){
|
||||
case ';':
|
||||
case ',':
|
||||
if(valueStr.length!=0){
|
||||
if(value.type!=Null)
|
||||
if(value.typeId!=kerepTypeId_Null)
|
||||
safethrow_wrongchar(c,Unitype_free(value));
|
||||
try(ParseValue(valueStr),maybeParsed,;)
|
||||
value=maybeParsed.value;
|
||||
@ -321,7 +321,7 @@ Maybe __deserialize(char** _text, bool _calledRecursively) {
|
||||
}
|
||||
else{
|
||||
list=Autoarr_create(Unitype,ARR_BC,ARR_BL);
|
||||
Hashtable_add(dict,nameCPtr,UniPtr(AutoarrUnitypePtr,list));
|
||||
Hashtable_add(dict,nameCPtr,UniPtrHeap(kerepTypeId_AutoarrUnitypePtr,list));
|
||||
}
|
||||
Autoarr_add(list,val.value);
|
||||
}
|
||||
@ -331,7 +331,7 @@ Maybe __deserialize(char** _text, bool _calledRecursively) {
|
||||
|
||||
END:
|
||||
*_text=text;
|
||||
return SUCCESS(UniPtr(HashtablePtr,dict));
|
||||
return SUCCESS(UniPtrHeap(kerepTypeId_HashtablePtr,dict));
|
||||
}
|
||||
|
||||
Maybe DtsodV24_deserialize(char* _text) {
|
||||
|
||||
@ -23,19 +23,18 @@ void __AppendTabs(SerializeSharedData* shared) {
|
||||
Maybe __AppendValue(SerializeSharedData* shared, Unitype u);
|
||||
#define AppendValue(UNI) __AppendValue(shared, UNI)
|
||||
Maybe __AppendValue(SerializeSharedData* shared, Unitype u){
|
||||
switch(u.type){
|
||||
case Int64:
|
||||
if(u.typeId==kerepTypeId_Int64){
|
||||
StringBuilder_append_int64(b,u.Int64);
|
||||
break;
|
||||
case UInt64:
|
||||
}
|
||||
else if(u.typeId==kerepTypeId_UInt64){
|
||||
StringBuilder_append_uint64(b,u.UInt64);
|
||||
addc('u');
|
||||
break;
|
||||
case Float64:
|
||||
}
|
||||
else if(u.typeId==kerepTypeId_Float64){
|
||||
StringBuilder_append_float64(b,u.Float64);
|
||||
addc('f');
|
||||
break;
|
||||
case CharPtr:
|
||||
}
|
||||
else if(u.typeId==kerepTypeId_CharPtr){
|
||||
addc('"');
|
||||
char c;
|
||||
while((c=*(char*)(u.VoidPtr++))){
|
||||
@ -43,13 +42,14 @@ Maybe __AppendValue(SerializeSharedData* shared, Unitype u){
|
||||
addc(c);
|
||||
}
|
||||
addc('"');
|
||||
break;
|
||||
case Bool:
|
||||
}
|
||||
else if(u.typeId==kerepTypeId_Bool){
|
||||
StringBuilder_append_cptr(b, u.Bool ? "true" : "false");
|
||||
break;
|
||||
case Null:
|
||||
}
|
||||
else if(u.typeId==kerepTypeId_Null){
|
||||
safethrow("Null isn't supported in DtsodV24",;);
|
||||
case AutoarrUnitypePtr:
|
||||
}
|
||||
else if(u.typeId==kerepTypeId_AutoarrUnitypePtr){
|
||||
if(Autoarr_length(((Autoarr_Unitype*)(u.VoidPtr)))){
|
||||
addc('\n');
|
||||
AppendTabs();
|
||||
@ -71,20 +71,16 @@ Maybe __AppendValue(SerializeSharedData* shared, Unitype u){
|
||||
addc('[');
|
||||
addc(']');
|
||||
}
|
||||
break;
|
||||
case HashtablePtr:
|
||||
}
|
||||
else if(u.typeId==kerepTypeId_HashtablePtr){
|
||||
// check hashtable is blank
|
||||
Hashtable_foreach(((Hashtable*)u.VoidPtr), __, ({
|
||||
goto hashtableNotBlank;
|
||||
if(__.key); // weird way to disable warning
|
||||
}));
|
||||
|
||||
|
||||
// blank hashtable
|
||||
addc('{');
|
||||
addc('}');
|
||||
break;
|
||||
|
||||
// not blank hashtable
|
||||
hashtableNotBlank:
|
||||
addc('\n');
|
||||
@ -94,10 +90,11 @@ Maybe __AppendValue(SerializeSharedData* shared, Unitype u){
|
||||
try(__serialize(b,tabs+1,u.VoidPtr),___,;);
|
||||
AppendTabs();
|
||||
addc('}');
|
||||
break;
|
||||
default: dbg((u.type)); safethrow(ERR_WRONGTYPE,;);
|
||||
}
|
||||
|
||||
else {
|
||||
dbg((u.typeId));
|
||||
safethrow(ERR_WRONGTYPE,;);
|
||||
}
|
||||
return MaybeNull;
|
||||
};
|
||||
|
||||
@ -125,5 +122,5 @@ Maybe DtsodV24_serialize(Hashtable* dtsod){
|
||||
StringBuilder* sb=StringBuilder_create();
|
||||
try(__serialize(sb,0,dtsod),__, StringBuilder_free(sb));
|
||||
char* str=StringBuilder_build(sb).ptr;
|
||||
return SUCCESS(UniPtr(CharPtr, str));
|
||||
return SUCCESS(UniPtrHeap(kerepTypeId_CharPtr, str));
|
||||
}
|
||||
|
||||
@ -92,7 +92,7 @@ Unitype Hashtable_get(Hashtable* ht, char* key){
|
||||
bool Hashtable_try_get(Hashtable* ht, char* key, Unitype* output){
|
||||
Unitype u=Hashtable_get(ht,key);
|
||||
*output=u;
|
||||
return u.type!=Null;
|
||||
return u.typeId!=kerepTypeId_Null;
|
||||
}
|
||||
|
||||
void Hashtable_addOrSet(Hashtable* ht, char* key, Unitype u){
|
||||
|
||||
@ -11,8 +11,8 @@ typedef struct Hashtable{
|
||||
uint8 hein; // height=HT_HEIGHTS[hein]
|
||||
Autoarr(KVPair)** rows; // Autoarr[height]
|
||||
} Hashtable;
|
||||
kerepType_declare(Hashtable);
|
||||
kerepType_declare(HashtablePtr);
|
||||
kerepTypeId_declare(kerepTypeId_Hashtable);
|
||||
kerepTypeId_declare(kerepTypeId_HashtablePtr);
|
||||
|
||||
Hashtable* Hashtable_create();
|
||||
void Hashtable_free(Hashtable* ht);
|
||||
|
||||
@ -11,12 +11,12 @@ typedef struct KVPair{
|
||||
char* key;
|
||||
Unitype value;
|
||||
} KVPair;
|
||||
kerepType_declare(KVPair);
|
||||
kerepType_declare(KVPairPtr);
|
||||
kerepTypeId_declare(kerepTypeId_KVPair);
|
||||
kerepTypeId_declare(kerepTypeId_KVPairPtr);
|
||||
|
||||
Autoarr_declare(KVPair)
|
||||
kerepType_declare(AutoarrKVPair);
|
||||
kerepType_declare(AutoarrKVPairPtr);
|
||||
kerepTypeId_declare(kerepTypeId_AutoarrKVPair);
|
||||
kerepTypeId_declare(kerepTypeId_AutoarrKVPairPtr);
|
||||
|
||||
// proper way to clear a KVP
|
||||
void KVPair_free(KVPair p);
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
STNode* STNode_create(){
|
||||
STNode* node=malloc(sizeof(STNode));
|
||||
node->branches=NULL;
|
||||
node->value.type=Null;
|
||||
node->value.typeId=kerepTypeId_Null;
|
||||
node->value.UInt64=0;
|
||||
return node;
|
||||
}
|
||||
|
||||
@ -11,8 +11,8 @@ typedef struct SearchTreeNode{
|
||||
struct SearchTreeNode**** branches; // *STNode[8][8][4]
|
||||
Unitype value;
|
||||
} STNode;
|
||||
kerepType_declare(STNode);
|
||||
kerepType_declare(STNodePtr);
|
||||
kerepTypeId_declare(kerepTypeId_STNode);
|
||||
kerepTypeId_declare(kerepTypeId_STNodePtr);
|
||||
|
||||
STNode* STNode_create();
|
||||
void STNode_free(STNode* node);
|
||||
|
||||
@ -13,8 +13,8 @@ typedef struct StringBuilder{
|
||||
Autoarr(string)* compl_bufs;
|
||||
Autoarr(int8)* curr_buf;
|
||||
} StringBuilder;
|
||||
kerepType_declare(StringBuilder);
|
||||
kerepType_declare(StringBuilderPtr);
|
||||
kerepTypeId_declare(kerepTypeId_StringBuilder);
|
||||
kerepTypeId_declare(kerepTypeId_StringBuilderPtr);
|
||||
|
||||
StringBuilder* StringBuilder_create(void);
|
||||
void StringBuilder_free(StringBuilder* b);
|
||||
|
||||
126
src/base/init.c
126
src/base/init.c
@ -6,90 +6,90 @@
|
||||
|
||||
void kerepTypeDescriptors_initKerepTypes(){
|
||||
// null
|
||||
kerepType_register(NULL, Null, NULL);
|
||||
kerepType_register(NULL, kerepTypeId_Null, NULL);
|
||||
// base types
|
||||
kerepType_register(char, Char, NULL);
|
||||
kerepType_register(bool, Bool, NULL);
|
||||
kerepType_register(float32, Float32, NULL);
|
||||
kerepType_register(float64, Float64, NULL);
|
||||
kerepType_register(int8, Int8, NULL);
|
||||
kerepType_register(uint8, UInt8, NULL);
|
||||
kerepType_register(int16, Int16, NULL);
|
||||
kerepType_register(uint16, UInt16, NULL);
|
||||
kerepType_register(int32, Int32, NULL);
|
||||
kerepType_register(uint32, UInt32, NULL);
|
||||
kerepType_register(int64, Int64, NULL);
|
||||
kerepType_register(uint64, UInt64, NULL);
|
||||
kerepType_register(char, kerepTypeId_Char, NULL);
|
||||
kerepType_register(bool, kerepTypeId_Bool, NULL);
|
||||
kerepType_register(float32, kerepTypeId_Float32, NULL);
|
||||
kerepType_register(float64, kerepTypeId_Float64, NULL);
|
||||
kerepType_register(int8, kerepTypeId_Int8, NULL);
|
||||
kerepType_register(uint8, kerepTypeId_UInt8, NULL);
|
||||
kerepType_register(int16, kerepTypeId_Int16, NULL);
|
||||
kerepType_register(uint16, kerepTypeId_UInt16, NULL);
|
||||
kerepType_register(int32, kerepTypeId_Int32, NULL);
|
||||
kerepType_register(uint32, kerepTypeId_UInt32, NULL);
|
||||
kerepType_register(int64, kerepTypeId_Int64, NULL);
|
||||
kerepType_register(uint64, kerepTypeId_UInt64, NULL);
|
||||
// base type pointers
|
||||
kerepType_register(char*, CharPtr, NULL);
|
||||
kerepType_register(bool*, BoolPtr, NULL);
|
||||
kerepType_register(float32*, Float32Ptr, NULL);
|
||||
kerepType_register(float64*, Float64Ptr, NULL);
|
||||
kerepType_register(int8*, Int8Ptr, NULL);
|
||||
kerepType_register(uint8*, UInt8Ptr, NULL);
|
||||
kerepType_register(int16*, Int16Ptr, NULL);
|
||||
kerepType_register(uint16*, UInt16Ptr, NULL);
|
||||
kerepType_register(int32*, Int32Ptr, NULL);
|
||||
kerepType_register(uint32*, UInt32Ptr, NULL);
|
||||
kerepType_register(int64*, Int64Ptr, NULL);
|
||||
kerepType_register(uint64*, UInt64Ptr, NULL);
|
||||
kerepType_register(char*, kerepTypeId_CharPtr, NULL);
|
||||
kerepType_register(bool*, kerepTypeId_BoolPtr, NULL);
|
||||
kerepType_register(float32*, kerepTypeId_Float32Ptr, NULL);
|
||||
kerepType_register(float64*, kerepTypeId_Float64Ptr, NULL);
|
||||
kerepType_register(int8*, kerepTypeId_Int8Ptr, NULL);
|
||||
kerepType_register(uint8*, kerepTypeId_UInt8Ptr, NULL);
|
||||
kerepType_register(int16*, kerepTypeId_Int16Ptr, NULL);
|
||||
kerepType_register(uint16*, kerepTypeId_UInt16Ptr, NULL);
|
||||
kerepType_register(int32*, kerepTypeId_Int32Ptr, NULL);
|
||||
kerepType_register(uint32*, kerepTypeId_UInt32Ptr, NULL);
|
||||
kerepType_register(int64*, kerepTypeId_Int64Ptr, NULL);
|
||||
kerepType_register(uint64*, kerepTypeId_UInt64Ptr, NULL);
|
||||
|
||||
// base type autoarrs
|
||||
kerepType_register(Autoarr_char, AutoarrChar, ____Autoarr_free_char);
|
||||
kerepType_register(Autoarr_bool, AutoarrBool, ____Autoarr_free_bool);
|
||||
kerepType_register(Autoarr_float32, AutoarrFloat32, ____Autoarr_free_float32);
|
||||
kerepType_register(Autoarr_float64, AutoarrFloat64, ____Autoarr_free_float64);
|
||||
kerepType_register(Autoarr_int8, AutoarrInt8, ____Autoarr_free_int8);
|
||||
kerepType_register(Autoarr_uint8, AutoarrUInt8, ____Autoarr_free_uint8);
|
||||
kerepType_register(Autoarr_int16, AutoarrInt16, ____Autoarr_free_int16);
|
||||
kerepType_register(Autoarr_uint16, AutoarrUInt16, ____Autoarr_free_uint16);
|
||||
kerepType_register(Autoarr_int32, AutoarrInt32, ____Autoarr_free_int32);
|
||||
kerepType_register(Autoarr_uint32, AutoarrUInt32, ____Autoarr_free_uint32);
|
||||
kerepType_register(Autoarr_int64, AutoarrInt64, ____Autoarr_free_int64);
|
||||
kerepType_register(Autoarr_uint64, AutoarrUInt64, ____Autoarr_free_uint64);
|
||||
kerepType_register(Autoarr_char, kerepTypeId_AutoarrChar, ____Autoarr_free_char);
|
||||
kerepType_register(Autoarr_bool, kerepTypeId_AutoarrBool, ____Autoarr_free_bool);
|
||||
kerepType_register(Autoarr_float32, kerepTypeId_AutoarrFloat32, ____Autoarr_free_float32);
|
||||
kerepType_register(Autoarr_float64, kerepTypeId_AutoarrFloat64, ____Autoarr_free_float64);
|
||||
kerepType_register(Autoarr_int8, kerepTypeId_AutoarrInt8, ____Autoarr_free_int8);
|
||||
kerepType_register(Autoarr_uint8, kerepTypeId_AutoarrUInt8, ____Autoarr_free_uint8);
|
||||
kerepType_register(Autoarr_int16, kerepTypeId_AutoarrInt16, ____Autoarr_free_int16);
|
||||
kerepType_register(Autoarr_uint16, kerepTypeId_AutoarrUInt16, ____Autoarr_free_uint16);
|
||||
kerepType_register(Autoarr_int32, kerepTypeId_AutoarrInt32, ____Autoarr_free_int32);
|
||||
kerepType_register(Autoarr_uint32, kerepTypeId_AutoarrUInt32, ____Autoarr_free_uint32);
|
||||
kerepType_register(Autoarr_int64, kerepTypeId_AutoarrInt64, ____Autoarr_free_int64);
|
||||
kerepType_register(Autoarr_uint64, kerepTypeId_AutoarrUInt64, ____Autoarr_free_uint64);
|
||||
// base type autoarr pointers
|
||||
kerepType_register(Autoarr_char*, AutoarrCharPtr, ____Autoarr_free_char);
|
||||
kerepType_register(Autoarr_bool*, AutoarrBoolPtr, ____Autoarr_free_bool);
|
||||
kerepType_register(Autoarr_float32*, AutoarrFloat32Ptr, ____Autoarr_free_float32);
|
||||
kerepType_register(Autoarr_float64*, AutoarrFloat64Ptr, ____Autoarr_free_float64);
|
||||
kerepType_register(Autoarr_int8*, AutoarrInt8Ptr, ____Autoarr_free_int8);
|
||||
kerepType_register(Autoarr_uint8*, AutoarrUInt8Ptr, ____Autoarr_free_uint8);
|
||||
kerepType_register(Autoarr_int16*, AutoarrInt16Ptr, ____Autoarr_free_int16);
|
||||
kerepType_register(Autoarr_uint16*, AutoarrUInt16Ptr, ____Autoarr_free_uint16);
|
||||
kerepType_register(Autoarr_int32*, AutoarrInt32Ptr, ____Autoarr_free_int32);
|
||||
kerepType_register(Autoarr_uint32*, AutoarrUInt32Ptr, ____Autoarr_free_uint32);
|
||||
kerepType_register(Autoarr_int64*, AutoarrInt64Ptr, ____Autoarr_free_int64);
|
||||
kerepType_register(Autoarr_uint64*, AutoarrUInt64Ptr, ____Autoarr_free_uint64);
|
||||
kerepType_register(Autoarr_char*, kerepTypeId_AutoarrCharPtr, ____Autoarr_free_char);
|
||||
kerepType_register(Autoarr_bool*, kerepTypeId_AutoarrBoolPtr, ____Autoarr_free_bool);
|
||||
kerepType_register(Autoarr_float32*, kerepTypeId_AutoarrFloat32Ptr, ____Autoarr_free_float32);
|
||||
kerepType_register(Autoarr_float64*, kerepTypeId_AutoarrFloat64Ptr, ____Autoarr_free_float64);
|
||||
kerepType_register(Autoarr_int8*, kerepTypeId_AutoarrInt8Ptr, ____Autoarr_free_int8);
|
||||
kerepType_register(Autoarr_uint8*, kerepTypeId_AutoarrUInt8Ptr, ____Autoarr_free_uint8);
|
||||
kerepType_register(Autoarr_int16*, kerepTypeId_AutoarrInt16Ptr, ____Autoarr_free_int16);
|
||||
kerepType_register(Autoarr_uint16*, kerepTypeId_AutoarrUInt16Ptr, ____Autoarr_free_uint16);
|
||||
kerepType_register(Autoarr_int32*, kerepTypeId_AutoarrInt32Ptr, ____Autoarr_free_int32);
|
||||
kerepType_register(Autoarr_uint32*, kerepTypeId_AutoarrUInt32Ptr, ____Autoarr_free_uint32);
|
||||
kerepType_register(Autoarr_int64*, kerepTypeId_AutoarrInt64Ptr, ____Autoarr_free_int64);
|
||||
kerepType_register(Autoarr_uint64*, kerepTypeId_AutoarrUInt64Ptr, ____Autoarr_free_uint64);
|
||||
|
||||
// Unitype
|
||||
kerepType_register(Unitype, Unitype, __UnitypePtr_free);
|
||||
kerepType_register(Unitype*, UnitypePtr, __UnitypePtr_free);
|
||||
kerepType_register(Autoarr_Unitype, AutoarrUnitype, ____Autoarr_free_Unitype_);
|
||||
kerepType_register(Autoarr_Unitype*, AutoarrUnitypePtr, ____Autoarr_free_Unitype_);
|
||||
kerepType_register(Unitype, kerepTypeId_Unitype, __UnitypePtr_free);
|
||||
kerepType_register(Unitype*, kerepTypeId_UnitypePtr, __UnitypePtr_free);
|
||||
kerepType_register(Autoarr_Unitype, kerepTypeId_AutoarrUnitype, ____Autoarr_free_Unitype_);
|
||||
kerepType_register(Autoarr_Unitype*, kerepTypeId_AutoarrUnitypePtr, ____Autoarr_free_Unitype_);
|
||||
// replacing autogenerated freear() function to custom
|
||||
Autoarr_Unitype* _uar=Autoarr_create(Unitype, 1, 1);
|
||||
_uar->functions->freear=__Autoarr_free_Unitype_;
|
||||
Autoarr_free(_uar, true);
|
||||
|
||||
// SearchTreeNode
|
||||
kerepType_register(STNode, STNode, __STNode_free);
|
||||
kerepType_register(STNode*, STNodePtr, __STNode_free);
|
||||
kerepType_register(STNode, kerepTypeId_STNode, __STNode_free);
|
||||
kerepType_register(STNode*, kerepTypeId_STNodePtr, __STNode_free);
|
||||
|
||||
// KeyValuePair
|
||||
kerepType_register(KVPair, KVPair, __KVPair_free);
|
||||
kerepType_register(KVPair*, KVPairPtr, __KVPair_free);
|
||||
kerepType_register(Autoarr_KVPair, AutoarrKVPair, ____Autoarr_free_KVPair_);
|
||||
kerepType_register(Autoarr_KVPair*, AutoarrKVPairPtr, ____Autoarr_free_KVPair_);
|
||||
kerepType_register(KVPair, kerepTypeId_KVPair, __KVPair_free);
|
||||
kerepType_register(KVPair*, kerepTypeId_KVPairPtr, __KVPair_free);
|
||||
kerepType_register(Autoarr_KVPair, kerepTypeId_AutoarrKVPair, ____Autoarr_free_KVPair_);
|
||||
kerepType_register(Autoarr_KVPair*, kerepTypeId_AutoarrKVPairPtr, ____Autoarr_free_KVPair_);
|
||||
// replacing autogenerated freear() function to custom
|
||||
Autoarr_KVPair* _kvpar=Autoarr_create(KVPair, 1, 1);
|
||||
_kvpar->functions->freear=__Autoarr_free_KVPair_;
|
||||
Autoarr_free(_kvpar, true);
|
||||
|
||||
// Hashtable
|
||||
kerepType_register(Hashtable, Hashtable, __Hashtable_free);
|
||||
kerepType_register(Hashtable*, HashtablePtr, __Hashtable_free);
|
||||
kerepType_register(Hashtable, kerepTypeId_Hashtable, __Hashtable_free);
|
||||
kerepType_register(Hashtable*, kerepTypeId_HashtablePtr, __Hashtable_free);
|
||||
|
||||
// StringBuilder
|
||||
kerepType_register(StringBuilder, StringBuilder, __StringBuilder_free);
|
||||
kerepType_register(StringBuilder*, StringBuilderPtr, __StringBuilder_free);
|
||||
kerepType_register(StringBuilder, kerepTypeId_StringBuilder, __StringBuilder_free);
|
||||
kerepType_register(StringBuilder*, kerepTypeId_StringBuilderPtr, __StringBuilder_free);
|
||||
}
|
||||
|
||||
@ -15,47 +15,49 @@ typedef struct kerepTypeDescriptor{
|
||||
uint16 size;
|
||||
} kerepTypeDescriptor;
|
||||
|
||||
#define kerepType_declare(NAME)\
|
||||
extern kerepTypeId kerepTypeId_##NAME
|
||||
#define kerepTypeId_declare(ID_VAR_NAME)\
|
||||
extern kerepTypeId ID_VAR_NAME
|
||||
#define kerepTypeId_define(ID_VAR_NAME)\
|
||||
kerepTypeId ID_VAR_NAME=-1
|
||||
|
||||
extern kerepTypeId kerepTypeId_last;
|
||||
void __kerepType_register(char* name, int16 size, void (*free_members)(void*));
|
||||
|
||||
#define kerepType_register(TYPE, NAME, FREE_MEMBERS_FUNC)\
|
||||
__kerepType_register(#NAME, sizeof(TYPE), FREE_MEMBERS_FUNC);\
|
||||
kerepTypeId_##NAME=kerepTypeId_last;
|
||||
#define kerepType_register(TYPE, ID_VAR_NAME, FREE_MEMBERS_FUNC)\
|
||||
__kerepType_register(#ID_VAR_NAME, sizeof(TYPE), FREE_MEMBERS_FUNC);\
|
||||
ID_VAR_NAME=kerepTypeId_last;
|
||||
|
||||
void kerepTypeDescriptors_beginInit();
|
||||
void kerepTypeDescriptors_endInit();
|
||||
kerepTypeDescriptor kerepTypeDescriptor_get(kerepTypeId id);
|
||||
|
||||
kerepType_declare(Null);
|
||||
kerepTypeId_declare(kerepTypeId_Null);
|
||||
|
||||
kerepType_declare(Char);
|
||||
kerepType_declare(Bool);
|
||||
kerepType_declare(Float32);
|
||||
kerepType_declare(Float64);
|
||||
kerepType_declare(Int8);
|
||||
kerepType_declare(UInt8);
|
||||
kerepType_declare(Int16);
|
||||
kerepType_declare(UInt16);
|
||||
kerepType_declare(Int32);
|
||||
kerepType_declare(UInt32);
|
||||
kerepType_declare(Int64);
|
||||
kerepType_declare(UInt64);
|
||||
kerepTypeId_declare(kerepTypeId_Char);
|
||||
kerepTypeId_declare(kerepTypeId_Bool);
|
||||
kerepTypeId_declare(kerepTypeId_Float32);
|
||||
kerepTypeId_declare(kerepTypeId_Float64);
|
||||
kerepTypeId_declare(kerepTypeId_Int8);
|
||||
kerepTypeId_declare(kerepTypeId_UInt8);
|
||||
kerepTypeId_declare(kerepTypeId_Int16);
|
||||
kerepTypeId_declare(kerepTypeId_UInt16);
|
||||
kerepTypeId_declare(kerepTypeId_Int32);
|
||||
kerepTypeId_declare(kerepTypeId_UInt32);
|
||||
kerepTypeId_declare(kerepTypeId_Int64);
|
||||
kerepTypeId_declare(kerepTypeId_UInt64);
|
||||
|
||||
kerepType_declare(CharPtr);
|
||||
kerepType_declare(BoolPtr);
|
||||
kerepType_declare(Float32Ptr);
|
||||
kerepType_declare(Float64Ptr);
|
||||
kerepType_declare(Int8Ptr);
|
||||
kerepType_declare(UInt8Ptr);
|
||||
kerepType_declare(Int16Ptr);
|
||||
kerepType_declare(UInt16Ptr);
|
||||
kerepType_declare(Int32Ptr);
|
||||
kerepType_declare(UInt32Ptr);
|
||||
kerepType_declare(Int64Ptr);
|
||||
kerepType_declare(UInt64Ptr);
|
||||
kerepTypeId_declare(kerepTypeId_CharPtr);
|
||||
kerepTypeId_declare(kerepTypeId_BoolPtr);
|
||||
kerepTypeId_declare(kerepTypeId_Float32Ptr);
|
||||
kerepTypeId_declare(kerepTypeId_Float64Ptr);
|
||||
kerepTypeId_declare(kerepTypeId_Int8Ptr);
|
||||
kerepTypeId_declare(kerepTypeId_UInt8Ptr);
|
||||
kerepTypeId_declare(kerepTypeId_Int16Ptr);
|
||||
kerepTypeId_declare(kerepTypeId_UInt16Ptr);
|
||||
kerepTypeId_declare(kerepTypeId_Int32Ptr);
|
||||
kerepTypeId_declare(kerepTypeId_UInt32Ptr);
|
||||
kerepTypeId_declare(kerepTypeId_Int64Ptr);
|
||||
kerepTypeId_declare(kerepTypeId_UInt64Ptr);
|
||||
|
||||
#if __cplusplus
|
||||
}
|
||||
|
||||
@ -18,24 +18,24 @@ typedef struct Unitype{
|
||||
kerepTypeId typeId;
|
||||
bool allocatedInHeap; // should Unitype_free call free() to VoidPtr*
|
||||
} Unitype;
|
||||
kerepType_declare(Unitype);
|
||||
kerepType_declare(UnitypePtr);
|
||||
kerepTypeId_declare(kerepTypeId_Unitype);
|
||||
kerepTypeId_declare(kerepTypeId_UnitypePtr);
|
||||
|
||||
|
||||
#define __Uni(TYPE,VAL) (Unitype){\
|
||||
.TYPE_NAME=VAL, .typeId=kerepTypeId_##TYPE, .allocatedInHeap=false}
|
||||
#define Uni(TYPE, VAL) (Unitype){\
|
||||
.TYPE=VAL, .typeId=kerepTypeId_##TYPE, .allocatedInHeap=false}
|
||||
|
||||
#define UniInt64(VAL) __Uni(Int64, VAL)
|
||||
#define UniUInt64(VAL) __Uni(UInt64, VAL)
|
||||
#define UniFloat64(VAL) __Uni(Float64, VAL)
|
||||
#define UniBool(VAL) __Uni(Bool, VAL)
|
||||
#define UniInt64(VAL) Uni(Int64, VAL)
|
||||
#define UniUInt64(VAL) Uni(UInt64, VAL)
|
||||
#define UniFloat64(VAL) Uni(Float64, VAL)
|
||||
#define UniBool(VAL) Uni(Bool, VAL)
|
||||
|
||||
#define UniPtrStack(TYPE_NAME,VAL) (Unitype){\
|
||||
.VoidPtr=VAL, .typeId=kerepTypeId_##TYPE_NAME, .allocatedInHeap=false}
|
||||
#define UniPtrHeap (TYPE_NAME,VAL) (Unitype){\
|
||||
.VoidPtr=VAL, .typeId=kerepTypeId_##TYPE_NAME, .allocatedInHeap=true}
|
||||
#define UniPtrStack(ID_VAR_NAME, VAL) (Unitype){\
|
||||
.VoidPtr=VAL, .typeId=ID_VAR_NAME, .allocatedInHeap=false}
|
||||
#define UniPtrHeap(ID_VAR_NAME, VAL) (Unitype){\
|
||||
.VoidPtr=VAL, .typeId=ID_VAR_NAME, .allocatedInHeap=true}
|
||||
|
||||
#define UniNull UniPtrStack(Null, NULL)
|
||||
#define UniNull UniPtrStack(kerepTypeId_Null, NULL)
|
||||
#define UniTrue UniBool(true)
|
||||
#define UniFalse UniBool(false)
|
||||
|
||||
|
||||
@ -13,6 +13,9 @@ void test_all(){
|
||||
|
||||
int main(){
|
||||
setlocale(LC_ALL, "en-US.Unicode");
|
||||
kerepTypeDescriptors_beginInit();
|
||||
kerepTypeDescriptors_initKerepTypes();
|
||||
kerepTypeDescriptors_endInit();
|
||||
printf("\e[92mkerep tests are starting!\e[97m\n");
|
||||
optime("test_all",1,test_all());
|
||||
printf("\e[0m\n");
|
||||
|
||||
@ -47,7 +47,7 @@ void test_autoarr(){
|
||||
resetar(ar);
|
||||
printf("\e[92mautoarr values reset\n");
|
||||
printallval(ar);
|
||||
Autoarr_free(ar);
|
||||
Autoarr_free(ar, true);
|
||||
printf("\e[92mautoarr deleted\n");
|
||||
}));
|
||||
}
|
||||
|
||||
@ -18,7 +18,7 @@ void print_dtsod(Hashtable* dtsod){
|
||||
printf("\e[92m");
|
||||
Hashtable_foreach(dtsod, p,({
|
||||
printkvp(p);
|
||||
if(p.value.type==HashtablePtr){
|
||||
if(p.value.typeId==kerepTypeId_HashtablePtr){
|
||||
printf(": {\n");
|
||||
Hashtable* sub=p.value.VoidPtr;
|
||||
Hashtable_foreach(sub, _p,({
|
||||
|
||||
@ -33,7 +33,7 @@ char data[]="iojihiojopijiugbjmoihftytryfdrh";
|
||||
}\
|
||||
printf("\e[93m%u \e[94mcollisions detected in %u hashes\n", collisions, COLLISION_TESTS);\
|
||||
}));\
|
||||
Autoarr_free(hashes);\
|
||||
Autoarr_free(hashes, true);\
|
||||
printf("\e[96m--------------------------------------\n");\
|
||||
})
|
||||
|
||||
|
||||
@ -4,7 +4,7 @@ EXPORT void CALL test_marshalling(char* text, KVPair** kptr){
|
||||
KVPair* k=malloc(sizeof(KVPair));
|
||||
k->key="message";
|
||||
char* tc=cptr_copy(text);
|
||||
Unitype u={.VoidPtr=tc, .type=CharPtr};
|
||||
Unitype u=UniPtrHeap(kerepTypeId_CharPtr,tc);
|
||||
k->value=u;
|
||||
*kptr=k;
|
||||
}
|
||||
|
||||
@ -27,27 +27,27 @@ void test_searchtree(){
|
||||
STNode* node=STNode_create();
|
||||
printf("\e[92mnode created\n");
|
||||
printf("push:\e[94m\n ");
|
||||
Unitype u={.type=Int64,.Int64=-3};
|
||||
Unitype u=UniInt64(-3);
|
||||
printuni(u);
|
||||
ST_push(node,"type", u);
|
||||
printf(" -> type\n ");
|
||||
u=(Unitype){.type=Int64,.Int64=25};
|
||||
u=UniInt64(25);
|
||||
printuni(u);
|
||||
ST_push(node,"time", u);
|
||||
printf(" -> time\n ");
|
||||
u=(Unitype){.type=Float64,.Float64=-542.00600};
|
||||
u=UniFloat64(-542.00600);
|
||||
printuni(u);
|
||||
ST_push(node,"author_id", u);
|
||||
printf(" -> author_id\n ");
|
||||
u=(Unitype){.type=Int64,.Int64=-31255};
|
||||
u=UniInt64(-31255);
|
||||
printuni(u);
|
||||
ST_push(node,"channel_id", u);
|
||||
printf(" -> channel_id\n ");
|
||||
u=(Unitype){.type=Float64,.Float64=32.2004};
|
||||
u=UniPtrHeap(kerepTypeId_CharPtr, cptr_copy("32.2004"));
|
||||
printuni(u);
|
||||
ST_push(node,"message_id", u);
|
||||
printf(" -> message_id\n ");
|
||||
u=(Unitype){.type=CharPtr,.VoidPtr=cptr_copy("some text UwU")};
|
||||
u=UniPtrStack(kerepTypeId_CharPtr,"some text UwU");
|
||||
printuni(u);
|
||||
ST_push(node,"text", u);
|
||||
printf(" -> text\n");
|
||||
|
||||
Loading…
Reference in New Issue
Block a user