gnomemm r2100 - in gstreamermm/trunk: . gstreamer/gstreamermm tests



Author: jaalburqu
Date: Fri Mar 13 18:59:41 2009
New Revision: 2100
URL: http://svn.gnome.org/viewvc/gnomemm?rev=2100&view=rev

Log:
2009-03-13  Josà Alburquerque  <jaalburqu svn gnome org>

	* gstreamer/gstreamermm/init.cc:
	* gstreamer/gstreamermm/object.cc:
	* gstreamer/gstreamermm/object.h:
	* gstreamer/gstreamermm/wrap.h:
	* tests/test-event-wrap.cc:
	* tests/test-init-check.cc:
	* tests/test-init.cc:
	* tests/test-message-wrap.cc:
	* tests/test-miniobject-wrap.cc:
	* tests/test-plugin-gen.cc:
	* tests/test-query-wrap.cc: Last NULL corrections.  I'm glad to have
	read the usage of NULL in the "Bjarne Stroustrup's C++ Style and
	Technique FAQ".  I'll probably have to continue understanding the use
	of null/nullptr(?) in time.  I'll probably also have to go over some
	of the contents in the FAQ for other things when I develop.

Modified:
   gstreamermm/trunk/ChangeLog
   gstreamermm/trunk/gstreamer/gstreamermm/init.cc
   gstreamermm/trunk/gstreamer/gstreamermm/object.cc
   gstreamermm/trunk/gstreamer/gstreamermm/object.h
   gstreamermm/trunk/gstreamer/gstreamermm/wrap.h
   gstreamermm/trunk/tests/test-event-wrap.cc
   gstreamermm/trunk/tests/test-init-check.cc
   gstreamermm/trunk/tests/test-init.cc
   gstreamermm/trunk/tests/test-message-wrap.cc
   gstreamermm/trunk/tests/test-miniobject-wrap.cc
   gstreamermm/trunk/tests/test-plugin-gen.cc
   gstreamermm/trunk/tests/test-query-wrap.cc

Modified: gstreamermm/trunk/gstreamer/gstreamermm/init.cc
==============================================================================
--- gstreamermm/trunk/gstreamer/gstreamermm/init.cc	(original)
+++ gstreamermm/trunk/gstreamer/gstreamermm/init.cc	Fri Mar 13 18:59:41 2009
@@ -62,7 +62,7 @@
   if(!s_init)
   {
     Glib::init();
-    gst_init(NULL, NULL);
+    gst_init(0, 0);
     initialize_wrap_system();
 
     s_init = true;
@@ -114,7 +114,7 @@
     Glib::init();
 
     GError* gerror = 0;
-    result = gst_init_check(NULL, NULL, &gerror);
+    result = gst_init_check(0, 0, &gerror);
 
 #ifdef GLIBMM_EXCEPTIONS_ENABLED
     if(gerror)

Modified: gstreamermm/trunk/gstreamer/gstreamermm/object.cc
==============================================================================
--- gstreamermm/trunk/gstreamer/gstreamermm/object.cc	(original)
+++ gstreamermm/trunk/gstreamer/gstreamermm/object.cc	Fri Mar 13 18:59:41 2009
@@ -136,7 +136,7 @@
 
 bool Object::set_name()
 {
-  return gst_object_set_name(gobj(), NULL);
+  return gst_object_set_name(gobj(), 0);
 }
 
 Glib::ustring Object::get_name() const

Modified: gstreamermm/trunk/gstreamer/gstreamermm/object.h
==============================================================================
--- gstreamermm/trunk/gstreamer/gstreamermm/object.h	(original)
+++ gstreamermm/trunk/gstreamer/gstreamermm/object.h	Fri Mar 13 18:59:41 2009
@@ -132,7 +132,7 @@
   bool set_name();
 
   /** Returns a copy of the name of object. For a nameless object, this
-   * returns NULL.
+   * returns null.
    *
    * @return The name of object. MT safe. This function grabs and releases
    * object's LOCK. 
@@ -154,14 +154,14 @@
 
   /** Returns the parent of object. 
    *
-   * @return Parent of object, this can be NULL if object has no parent. MT
+   * @return Parent of object, this can be null if object has no parent. MT
    * safe. Grabs and releases object's LOCK.
    */
   Glib::RefPtr<Object> get_parent();
 
   /** Returns the parent of object. 
    *
-   * @return Parent of object, this can be NULL if object has no parent. MT
+   * @return Parent of object, this can be null if object has no parent. MT
    * safe. Grabs and releases object's LOCK.
    */
   Glib::RefPtr<const Object> get_parent() const;
@@ -174,7 +174,7 @@
   void unparent();
   
   /** Returns a copy of the name prefix of object. For a prefixless object,
-   * this returns NULL.
+   * this returns null.
    *
    * @return The name prefix of object. MT safe. This function grabs and
    * releases object's LOCK. 

Modified: gstreamermm/trunk/gstreamer/gstreamermm/wrap.h
==============================================================================
--- gstreamermm/trunk/gstreamer/gstreamermm/wrap.h	(original)
+++ gstreamermm/trunk/gstreamer/gstreamermm/wrap.h	Fri Mar 13 18:59:41 2009
@@ -50,7 +50,7 @@
 
 /** Create a C++ instance of a known C++ type that is mostly closely associated with the GType of the C object.
  * @param object The C object which should be placed in a new C++ instance.
- * @param interface_gtype The returned instance will implement this interface. Otherwise it will be NULL.
+ * @param interface_gtype The returned instance will implement this interface. Otherwise it will be null.
  */
 Gst::MiniObject* wrap_create_new_wrapper_for_interface(GstMiniObject* object, GType interface_gtype);
 
@@ -102,7 +102,7 @@
 
 
 /** Get the underlying C instance from the C++ instance.  This is just
- * like calling gobj(), but it does its own check for a NULL pointer.
+ * like calling gobj(), but it does its own check for a null pointer.
  */
 template <class T> inline
 typename T::BaseObjectType* unwrap(T* ptr)
@@ -111,7 +111,7 @@
 }
 
 /** Get the underlying C instance from the C++ instance.  This is just
- * like calling gobj(), but it does its own check for a NULL pointer.
+ * like calling gobj(), but it does its own check for a null pointer.
  */
 template <class T> inline
 const typename T::BaseObjectType* unwrap(const T* ptr)
@@ -120,7 +120,7 @@
 }
 
 /** Get the underlying C instance from the C++ instance.  This is just
- * like calling gobj(), but it does its own check for a NULL pointer.
+ * like calling gobj(), but it does its own check for a null pointer.
  */
 template <class T> inline
 typename T::BaseObjectType* unwrap(const Glib::RefPtr<T>& ptr)
@@ -129,7 +129,7 @@
 }
 
 /** Get the underlying C instance from the C++ instance.  This is just
- * like calling gobj(), but it does its own check for a NULL pointer.
+ * like calling gobj(), but it does its own check for a null pointer.
  */
 template <class T> inline
 const typename T::BaseObjectType* unwrap(const Glib::RefPtr<const T>& ptr)
@@ -139,7 +139,7 @@
 
 /** Get the underlying C instance from the C++ instance and acquire a
  * reference.  This is just like calling gobj_copy(), but it does its own
- * check for a NULL pointer.
+ * check for a null pointer.
  */
 template <class T> inline
 typename T::BaseObjectType* unwrap_copy(const Glib::RefPtr<T>& ptr)
@@ -149,7 +149,7 @@
 
 /** Get the underlying C instance from the C++ instance and acquire a
  * reference.  This is just like calling gobj_copy(), but it does its own
- * check for a NULL pointer.
+ * check for a null pointer.
  */
 template <class T> inline
 const typename T::BaseObjectType* unwrap_copy(const Glib::RefPtr<const T>& ptr)

Modified: gstreamermm/trunk/tests/test-event-wrap.cc
==============================================================================
--- gstreamermm/trunk/tests/test-event-wrap.cc	(original)
+++ gstreamermm/trunk/tests/test-event-wrap.cc	Fri Mar 13 18:59:41 2009
@@ -28,7 +28,7 @@
   
   Glib::RefPtr<Gst::Event> event = Gst::Event::wrap(cevent);
 
-  std::cout << "C++ event instance is !NULL: " << (bool)(event) << std::endl;
+  std::cout << "C++ event instance is !null: " << (bool)(event) << std::endl;
 
   Glib::RefPtr<Gst::EventLatency> event_latency = Glib::RefPtr<Gst::EventLatency>::cast_dynamic(event);
   std::cout << "event is a Gst::EventLatency: " << (bool)event_latency  << std::endl;

Modified: gstreamermm/trunk/tests/test-init-check.cc
==============================================================================
--- gstreamermm/trunk/tests/test-init-check.cc	(original)
+++ gstreamermm/trunk/tests/test-init-check.cc	Fri Mar 13 18:59:41 2009
@@ -56,7 +56,7 @@
     xoverlay->handle_events(false);
   }
 
-  GstClock* gst_clock = gst_audio_clock_new("clock", NULL, NULL);
+  GstClock* gst_clock = gst_audio_clock_new("clock", 0, 0);
   Glib::RefPtr<Gst::AudioClock> clock = Glib::wrap(GST_AUDIO_CLOCK(gst_clock));
 
   if (clock)

Modified: gstreamermm/trunk/tests/test-init.cc
==============================================================================
--- gstreamermm/trunk/tests/test-init.cc	(original)
+++ gstreamermm/trunk/tests/test-init.cc	Fri Mar 13 18:59:41 2009
@@ -42,7 +42,7 @@
     xoverlay->handle_events(false);
   }
 
-  GstClock* gst_clock = gst_audio_clock_new("clock", NULL, NULL);
+  GstClock* gst_clock = gst_audio_clock_new("clock", 0, 0);
   Glib::RefPtr<Gst::AudioClock> clock = Glib::wrap(GST_AUDIO_CLOCK(gst_clock));
 
   if (clock)

Modified: gstreamermm/trunk/tests/test-message-wrap.cc
==============================================================================
--- gstreamermm/trunk/tests/test-message-wrap.cc	(original)
+++ gstreamermm/trunk/tests/test-message-wrap.cc	Fri Mar 13 18:59:41 2009
@@ -32,7 +32,7 @@
   
   Glib::RefPtr<Gst::Message> message = Gst::Message::wrap(cmessage);
 
-  std::cout << "C++ message instance is !NULL: " << (bool)(message) << std::endl;
+  std::cout << "C++ message instance is !null: " << (bool)(message) << std::endl;
 
   Glib::RefPtr<Gst::MessageWarning> message_warning = Glib::RefPtr<Gst::MessageWarning>::cast_dynamic(message);
   std::cout << "message is a Gst::MessageWarning: " << (bool)message_warning  << std::endl;

Modified: gstreamermm/trunk/tests/test-miniobject-wrap.cc
==============================================================================
--- gstreamermm/trunk/tests/test-miniobject-wrap.cc	(original)
+++ gstreamermm/trunk/tests/test-miniobject-wrap.cc	Fri Mar 13 18:59:41 2009
@@ -32,7 +32,7 @@
   
   Glib::RefPtr<Gst::Message> message = Gst::wrap(cmessage);
 
-  std::cout << "C++ message instance is !NULL: " << (bool)(message) << std::endl;
+  std::cout << "C++ message instance is !null: " << (bool)(message) << std::endl;
 
   return 0;
 }

Modified: gstreamermm/trunk/tests/test-plugin-gen.cc
==============================================================================
--- gstreamermm/trunk/tests/test-plugin-gen.cc	(original)
+++ gstreamermm/trunk/tests/test-plugin-gen.cc	Fri Mar 13 18:59:41 2009
@@ -37,7 +37,7 @@
 
   gulong mmapsize = 0;
   GstFileSrc* obj = filesrc->gobj();
-  g_object_get(obj, "mmapsize", &mmapsize, NULL);
+  g_object_get(obj, "mmapsize", &mmapsize, 0);
 
   std::cout << "mmapsize = "  << mmapsize << std::endl;
 

Modified: gstreamermm/trunk/tests/test-query-wrap.cc
==============================================================================
--- gstreamermm/trunk/tests/test-query-wrap.cc	(original)
+++ gstreamermm/trunk/tests/test-query-wrap.cc	Fri Mar 13 18:59:41 2009
@@ -28,7 +28,7 @@
   
   Glib::RefPtr<Gst::Query> query = Gst::Query::wrap(cquery);
 
-  std::cout << "C++ query instance is !NULL: " << (bool)(query) << std::endl;
+  std::cout << "C++ query instance is !null: " << (bool)(query) << std::endl;
 
   Glib::RefPtr<Gst::QueryPosition> query_position = Glib::RefPtr<Gst::QueryPosition>::cast_dynamic(query);
   std::cout << "query is a Gst::QueryPosition: " << (bool)query_position  << std::endl;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]