- Basic RTTI type data with inheritance.

This commit is contained in:
2025-11-28 12:58:23 -05:00
parent b9026ec8da
commit fe8c3a4602
126 changed files with 2158 additions and 979 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -16,17 +16,42 @@
// along with this program. If not, see <https://www.gnu.org/licenses/>.
// =====================================================================================================================
#include <fennec/lang/detail/_stdlib.h>
using assert_handler = void (*)(const char *, const char *, int , const char *);
#include <fennec/lang/filesystem/path.h>
void _assert_callback(const char* expression, const char* file, int line, const char* function, const char* description);
void _assert_impl(const char* expression, const char* file, int line, const char* function, const char* description, bool halt)
namespace fennec
{
_assert_callback(expression, file, line, function, description);
if (halt) {
::abort();
#ifdef FENNEC_COMPILER_MSVC
path path::current() {
char cstr[MAX_PATH];
if (GetCurrentDirectory(sizeof(str), str) == 0) {
return string("");
}
return path(cstr);
}
#else
#include <unistd.h>
#include <linux/limits.h>
path path::current() {
char cstr[PATH_MAX];
if (getcwd(cstr, sizeof(cstr)) == nullptr) {
return path("");
}
return path(cstring(cstr, strlen(cstr) + 1));
}
path path::current(const path& path) {
if (chdir(path._str.cstr())) {
return fennec::path("");
}
return current();
}
#endif
}