Fixing lalr on windows

This commit is contained in:
Ilusha 2024-03-09 12:02:02 +03:00
parent ffafeba6c2
commit afe32d6014
15 changed files with 1276 additions and 1226 deletions

View file

@ -22,7 +22,6 @@ define base type
define struct members
implement construct, destruct and copy methods */
#define OBJECT_REF_COUNT
#ifdef _DEBUG
#define NDO_CAST(cast_type, ptr) ((cast_type*)ndo_cast(ptr, &cast_type::TypeData))
@ -93,9 +92,7 @@ namespace obj {
ObjectMemHead* up;
ObjectMemHead* down;
tp::alni flags;
#ifdef OBJECT_REF_COUNT
tp::alni refc;
#endif
};
struct Object {
@ -210,13 +207,11 @@ namespace obj {
void destroy(Object* in);
#ifdef OBJECT_REF_COUNT
void refinc(Object* in);
tp::halni getrefc(Object* in);
private:
void setrefc(Object* in, tp::halni refc);
public:
#endif
save_load_callbacks* sl_callbacks[SAVE_LOAD_MAX_CALLBACK_SLOTS];
tp::alni sl_callbacks_load_idx = 0;
@ -238,6 +233,7 @@ namespace obj {
void logTypeData(const ObjectType* type);
void assertNoLeaks();
tp::ualni getObjCount();
Object* ndo_cast(const Object* in, const ObjectType* to_type);

View file

@ -23,10 +23,7 @@ namespace obj {
Type* createMember(tp::String id) {
auto out = NDO->create(Type::TypeData.name);
addMember(out, id);
#ifdef OBJECT_REF_COUNT
NDO->destroy(out);
#endif // OBJECT_REF_COUNT
return (Type*) out;
}