Port a bunch of Godot container templates to GDExtension.

This commit is contained in:
bruvzg
2022-02-15 12:58:28 +02:00
parent 6a464b53f1
commit e36180f377
24 changed files with 7245 additions and 1 deletions

View File

@@ -46,12 +46,24 @@ void Memory::free_static(void *p_ptr) {
internal::gdn_interface->mem_free(p_ptr);
}
_GlobalNil::_GlobalNil() {
left = this;
right = this;
parent = this;
}
_GlobalNil _GlobalNilClass::_nil;
} // namespace godot
void *operator new(size_t p_size, const char *p_description) {
return godot::Memory::alloc_static(p_size);
}
void *operator new(size_t p_size, void *(*p_allocfunc)(size_t p_size)) {
return p_allocfunc(p_size);
}
using namespace godot;
#ifdef _MSC_VER
@@ -69,4 +81,5 @@ void operator delete(void *p_mem, void *p_pointer, size_t check, const char *p_d
ERR_PRINT("Call to placement delete should not happen.");
CRASH_NOW();
}
#endif