<commit_before>#ifndef H_PRISM_OBJECTS_INCLUDED
#define H_PRISM_OBJECTS_INCLUDED

#include <Prism/types.h>
#include <Prism/memory.h>
#include <Prism/sigslot.h>

PR_CPP_PROTECT_ON

    #define PR_OBJECT(name_t, name) \
        typedef struct name_t name; \
        typedef name * name##Ref; \
        struct name_t 

    #define Pr_SlotFunction(name) \
        Pr_Slot slot_##name; \
        void (*name)

    #define PR_INHERIT(type) type self

    typedef struct pr_class_t Pr_Class;
   
    PR_OBJECT(pr_object_t, Pr_Object) {
        Pr_Class *  class;
        Pr_Signal * onDelete;
    };

    struct pr_class_t {
        char const *    name;
        pr_u32_t        objectSize;
        pr_u32_t        refCount;
        Pr_Class *      inherit;
        Pr_MemoryPool * memoryPool;
        pr_u8_t         poolSize;
        pr_bool_t       abstract;

        pr_bool_t   (*construct)(Pr_ObjectRef);
        void        (*destruct)(Pr_ObjectRef);
    };

    extern PRISM_API Pr_Class Pr_ObjectClass;

    extern PRISM_API void *     Pr_New(Pr_Class *);
    extern PRISM_API void       Pr_Delete(Pr_ObjectRef);

    extern PRISM_API void *     Pr_Alloc(Pr_Class *);

    extern PRISM_API pr_bool_t  Pr_Construct(Pr_ObjectRef);

PR_CPP_PROTECT_OFF<commit_msg>Objects : fixed Pr_Object definition<commit_after>#ifndef H_PRISM_OBJECTS_INCLUDED
#define H_PRISM_OBJECTS_INCLUDED

#include <Prism/types.h>
#include <Prism/memory.h>
#include <Prism/sigslot.h>

PR_CPP_PROTECT_ON

    #define PR_OBJECT(name_t, name) \
        typedef struct name_t name; \
        typedef name * name##Ref; \
        struct name_t 

    #define Pr_SlotFunction(name) \
        Pr_Slot slot_##name; \
        void (*name)

    #define PR_INHERIT(type) type self

    typedef struct pr_class_t Pr_Class;
   
    PR_OBJECT(pr_object_t, Pr_Object) {
        Pr_Class *  class;
        Pr_Signal * onDelete;
        Pr_Signal * onConstruction;
    };

    struct pr_class_t {
        char const *    name;
        pr_u32_t        objectSize;
        pr_u32_t        refCount;
        Pr_Class *      inherit;
        Pr_MemoryPool * memoryPool;
        pr_u8_t         poolSize;
        pr_bool_t       abstract;

        pr_bool_t   (*construct)(Pr_ObjectRef);
        void        (*destruct)(Pr_ObjectRef);
    };

    extern PRISM_API Pr_Class Pr_ObjectClass;

    extern PRISM_API void *     Pr_New(Pr_Class *);
    extern PRISM_API void       Pr_Delete(Pr_ObjectRef);

    extern PRISM_API void *     Pr_Alloc(Pr_Class *);

    extern PRISM_API pr_bool_t  Pr_Construct(Pr_ObjectRef);

PR_CPP_PROTECT_OFF
{'fraction_non_alphanumeric': 0.07781649245063879, 'fraction_numerical': 0.0038714672861014324, 'mean_word_length': 2.391076115485564, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1424233', 'n_tokens_mistral': 929, 'n_tokens_neox': 877, 'n_words': 174}