/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 libssts/baseobject.c

  • Committer: Gustav Hartvigsson
  • Date: 2015-10-28 14:45:22 UTC
  • mto: This revision was merged to the branch mainline in revision 111.
  • Revision ID: gustav.hartvigsson@gmail.com-20151028144522-fo54z73ssjex0emw
* SMap seems to be broken... Or could it be SObject's Callback stuff? Or SLinkedList?

Show diffs side-by-side

added added

removed removed

Lines of Context:
97
97
 
98
98
  self->refcount = 1;
99
99
 
 
100
  self->callbacks = s_map_new (COMPFUNC (s_string_is_equal),
 
101
                               HASH_FUNC (sdbm_hash),
 
102
                               FREEFUNC (free),
 
103
                               FREEFUNC (s_callback_entry_free));
 
104
 
100
105
  s_object_set_free_method (self, method_base_free);
101
106
  s_object_set_ref_method (self, method_base_ref);
102
107
  s_object_set_unref_method (self, method_base_unref);
119
124
void
120
125
s_object_free (SObject * self) {
121
126
  free (self->name);
 
127
  s_map_free (self->callbacks, TRUE);
122
128
  SObjectClass * klass = s_object_get_class (self);
123
129
  klass->free (self);
124
130
}
193
199
 
194
200
char *
195
201
method_base_to_string (SObject * self) {
196
 
  char * ret_string = s_string_new_fmt ("(SObject, References: %d)", self->base_class->get_refcount(self));
 
202
  char * ret_string = s_string_new_fmt ("(SObject, References: %d)",
 
203
                                        self->base_class->get_refcount(self));
197
204
  return ret_string;
198
205
}
199
206