2003-01-10 Padraig O'Briain <padraig.obriain@sun.com
[platform/core/uifw/at-spi2-atk.git] / libspi / value.c
index e576486..c2eade5 100644 (file)
@@ -2,7 +2,8 @@
  * AT-SPI - Assistive Technology Service Provider Interface
  * (Gnome Accessibility Project; http://developer.gnome.org/projects/gap)
  *
- * Copyright 2001 Sun Microsystems Inc.
+ * Copyright 2001, 2002 Sun Microsystems Inc.,
+ * Copyright 2001, 2002 Ximian, Inc.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
@@ -83,7 +84,7 @@ spi_value_interface_new (AtkObject *obj)
 {
   SpiValue *new_value = g_object_new (SPI_VALUE_TYPE, NULL);
 
-  spi_base_construct (SPI_BASE (new_value), obj);
+  spi_base_construct (SPI_BASE (new_value), G_OBJECT(obj));
 
   return new_value;
 }
@@ -94,12 +95,9 @@ get_value_from_servant (PortableServer_Servant servant)
 {
   SpiBase *object = SPI_BASE (bonobo_object_from_servant (servant));
 
-  if (!object)
-    {
-      return NULL;
-    }
-
-  return ATK_VALUE (object->atko);
+  g_return_val_if_fail (object, NULL);
+  g_return_val_if_fail (ATK_IS_OBJECT(object->gobj), NULL);
+  return ATK_VALUE (object->gobj);
 }
 
 static double