Shouldn't need to cast, as `g_object_ref` returns a `gpointer`.