/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 tests/callback.c

  • Committer: Gustav Hartvigsson
  • Date: 2016-02-01 14:11:35 UTC
  • mto: This revision was merged to the branch mainline in revision 122.
  • Revision ID: gustav.hartvigsson@gmail.com-20160201141135-pcl4m4gcf8r7t11e
* Made the GC switchable at rutime (once) when compiled with S_USE_GC set.
* replaced:
  * malloc ->   s_malloc
  * free ->     s_free
  * realloc ->  s_realloc
  * calloc ->   s_calloc

* Made s_[malloc, calloc, free, realloc] functions and moved them to their own file.
  This can be used os basis for other memory stuffs in the future, if we want to use
  a Slab allocator or something else.

Show diffs side-by-side

added added

removed removed

Lines of Context:
43
43
  test_case (s_object_notify (obj, "test1", NULL) == 2,
44
44
            "the output from the callback is the expected value");
45
45
 
46
 
  sint * output = malloc (sizeof (sint));
 
46
  sint * output = s_malloc (sizeof (sint));
47
47
 
48
48
  s_object_notify (obj, "test2", (spointer)output);
49
49
 
53
53
  test_case (*output == 1337, "The value that was given via the"
54
54
                              " user_data pointer has the corret"
55
55
                              " value");
56
 
  free (output);
 
56
  s_free (output);
57
57
 
58
58
  s_object_free (obj);
59
59