/simpletypesystem/trunk

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/simpletypesystem/trunk

« back to all changes in this revision

Viewing changes to src/baseobject.h

  • Committer: Gustav Hartvigsson
  • Date: 2015-04-28 12:25:20 UTC
  • Revision ID: gustav.hartvigsson@gmail.com-20150428122520-n90grm1k1l318ooa
* Finnished SLinkedList.
  * Still needs to be tested.
* Made s_object_initialize take the name of the class
* made s_object_free free the name
* fixed s_dynamic_array_free. It now takes a sboolean to tell it
  to free the data in the array or not.
* fixed a typo in defs.h
* fixed the the test of the dynamic array.
* switched (SObject *) to S_OBJECT () for casting in SError.
* changed hash_t to size_t.
* general code cleanup.

Show diffs side-by-side

added added

removed removed

Lines of Context:
102
102
 
103
103
 
104
104
struct SObject {
105
 
  char * name;
106
 
  SObjectClass * base_class;
107
 
  SMap * callbacks;
108
 
  unsigned int refcount;
 
105
  char * name; /*< The name of the class.*/
 
106
  SObjectClass * base_class; /*< holds the reference to the class. */
 
107
  SMap * callbacks; /*< This is what holds the callbacks. */
 
108
  unsigned int refcount; /*< The reference count. */
109
109
};
110
110
 
111
111
 
175
175
 * This function initializes an instance of the SObject, it also sets
176
176
 * the methods to be used with the object and sets the reference count to one.
177
177
 */
178
 
void s_object_initialize (SObject * self);
 
178
void s_object_initialize (SObject * self, const char * name);
179
179
 
180
180
/** @brief
181
181
 * This function creates a new base object.