Move towards an alloc/init pair for base types
authorEmmanuele Bassi <ebassi@linux.intel.com>
Wed, 18 Apr 2012 16:31:28 +0000 (17:31 +0100)
committerEmmanuele Bassi <ebassi@linux.intel.com>
Fri, 27 Apr 2012 11:30:47 +0000 (12:30 +0100)
commitbc914bb8a243e102dc3412edcf3b5bb5e9dccf0d
treef35e573ab4df18f1dc5d7dd412f158c2e6f544bd
parent0fc4053613a4dff7c0aad2d4348c2d86be9b41d5
Move towards an alloc/init pair for base types

Instead of a single new() constructor that both allocates and
initializes, split the allocation and initialization into two separate
functions for types that are typically used on the stack, and rarely
allocated on the heap, like ClutterPoint and friends.

This is also applied retroactively to ClutterActorBox and ClutterVertex,
given that the same considerations on usage apply to them as well; we
can add a return value to clutter_actor_box_init() and
clutter_vertex_init() in an ABI-compatible way, so that
clutter_actor_box_new() and clutter_vertex_new() can be effectively
reimplemented as "init (alloc ())".
clutter/clutter-actor-box.c
clutter/clutter-base-types.c
clutter/clutter-types.h
clutter/clutter.symbols