libgda r3303 - in trunk: . libgda



Author: vivien
Date: Tue Jan 27 20:59:09 2009
New Revision: 3303
URL: http://svn.gnome.org/viewvc/libgda?rev=3303&view=rev

Log:
2009-01-27  Vivien Malerba <malerba gnome-db org>

	* libgda/gda-easy.c:
	* libgda/gda-mutex.c:
	* libgda/gda-meta-store.c:
	* libgda/gda-value.c:
	* libgda/gda-meta-struct.h: doc. updates


Modified:
   trunk/ChangeLog
   trunk/libgda/gda-easy.c
   trunk/libgda/gda-meta-store.c
   trunk/libgda/gda-meta-struct.h
   trunk/libgda/gda-mutex.c
   trunk/libgda/gda-value.c

Modified: trunk/libgda/gda-easy.c
==============================================================================
--- trunk/libgda/gda-easy.c	(original)
+++ trunk/libgda/gda-easy.c	Tue Jan 27 20:59:09 2009
@@ -423,7 +423,7 @@
 /**
  * gda_prepare_drop_table
  * @cnc: an opened connection
- * @table_name:
+ * @table_name: name of the table to drop
  * @error: a place to store errors, or %NULL
  * 
  * This is just a convenient function to create a #GdaServerOperation to drop a 

Modified: trunk/libgda/gda-meta-store.c
==============================================================================
--- trunk/libgda/gda-meta-store.c	(original)
+++ trunk/libgda/gda-meta-store.c	Tue Jan 27 20:59:09 2009
@@ -1946,7 +1946,7 @@
  *
  * Get @store's internal schema's version
  *
- * Retunrs: the version (1 at the moment)
+ * Returns: the version (1 at the moment)
  */
 gint
 gda_meta_store_get_version (GdaMetaStore *store) {

Modified: trunk/libgda/gda-meta-struct.h
==============================================================================
--- trunk/libgda/gda-meta-struct.h	(original)
+++ trunk/libgda/gda-meta-struct.h	Tue Jan 27 20:59:09 2009
@@ -149,8 +149,8 @@
 	gchar        *default_value;
 } GdaMetaTableColumn;
 #define GDA_META_TABLE_COLUMN(x) ((GdaMetaTableColumn*)(x))
-const GValue *gda_meta_table_column_get_attribute (GdaMetaTableColumn *tcol, const gchar *att_name);
-void          gda_meta_table_column_set_attribute (GdaMetaTableColumn *tcol, const gchar *att_name, const GValue *value,
+const GValue *gda_meta_table_column_get_attribute (GdaMetaTableColumn *tcol, const gchar *attribute);
+void          gda_meta_table_column_set_attribute (GdaMetaTableColumn *tcol, const gchar *attribute, const GValue *value,
 						   GDestroyNotify destroy);
 /**
  * gda_meta_table_column_set_attribute_static

Modified: trunk/libgda/gda-mutex.c
==============================================================================
--- trunk/libgda/gda-mutex.c	(original)
+++ trunk/libgda/gda-mutex.c	Tue Jan 27 20:59:09 2009
@@ -93,9 +93,9 @@
 
 /**
  * gda_mutex_lock
- * @m: a #GdaMutex
+ * @mutex: a #GdaMutex
  *
- * Locks @m. If @m is already locked by another thread, the current thread will block until @m is unlocked by the other thread.
+ * Locks @mutex. If @mutex is already locked by another thread, the current thread will block until @mutex is unlocked by the other thread.
  *
  * This function can be used even if g_thread_init() has not yet been called, and, in that case, will do nothing.
  *
@@ -103,116 +103,117 @@
  * to unlock it as many times to actually unlock it).
  */
 void
-gda_mutex_lock (GdaMutex *m)
+gda_mutex_lock (GdaMutex *mutex)
 {
 	if (impl_status == RECURSIVE)
-		g_mutex_lock (m->mutex);
+		g_mutex_lock (mutex->mutex);
 	else if (impl_status == NON_SUPPORTED)
 		return;
 	else {
 		GThread *th = g_thread_self ();
-		g_mutex_lock (m->mutex);
+		g_mutex_lock (mutex->mutex);
 		while (1) {
-			if (!m->owner) {
-				m->owner = th;
-				m->depth = 1;
+			if (!mutex->owner) {
+				mutex->owner = th;
+				mutex->depth = 1;
 				break;
 			}
-			else if (m->owner == th) {
-				m->depth++;
+			else if (mutex->owner == th) {
+				mutex->depth++;
 				break;
 			}
 			else {
-				g_cond_wait (m->cond, m->mutex);
+				g_cond_wait (mutex->cond, mutex->mutex);
 			}
                 }
-		g_mutex_unlock (m->mutex);
+		g_mutex_unlock (mutex->mutex);
 	}
 }
 
 /**
  * gda_mutex_trylock
- * @m: a #GdaMutex
+ * @mutex: a #GdaMutex
  * 
- * Tries to lock @m. If @m is already locked by another thread, it immediately returns FALSE.
- * Otherwise it locks @m and returns TRUE
+ * Tries to lock @mutex. If @mutex is already locked by another thread, it immediately returns FALSE.
+ * Otherwise it locks @mutex and returns TRUE
  *
  * This function can be used even if g_thread_init() has not yet been called, and, in that case, will immediately return TRUE.
  *
  * Note: Unlike g_mutex_trylock(), the #GdaMutex is recursive, which means a thread can lock it several times (and has
  * to unlock it as many times to actually unlock it)
  *
- * Returns: TRUE, if @m could be locked.
+ * Returns: TRUE, if @mutex could be locked.
  */
 gboolean
-gda_mutex_trylock (GdaMutex *m)
+gda_mutex_trylock (GdaMutex *mutex)
 {
 	if (impl_status == RECURSIVE)
-		return g_mutex_trylock (m->mutex);
+		return g_mutex_trylock (mutex->mutex);
 	else if (impl_status == NON_SUPPORTED)
 		return TRUE;
 	else {
 		GThread *th = g_thread_self ();
 		gboolean retval;
-		g_mutex_lock (m->mutex);
-		if (!m->owner) {
-			m->owner = th;
-			m->depth = 1;
+		g_mutex_lock (mutex->mutex);
+		if (!mutex->owner) {
+			mutex->owner = th;
+			mutex->depth = 1;
 			retval = TRUE;
 		}
-		else if (m->owner == th) {
-			m->depth++;
+		else if (mutex->owner == th) {
+			mutex->depth++;
 			retval = TRUE;
 		}
 		else
 			retval = FALSE;
-		g_mutex_unlock (m->mutex);
+		g_mutex_unlock (mutex->mutex);
 		return retval;
 	}
 }
 
 /**
  * gda_mutex_unlock
- * @m: a #GdaMutex
+ * @mutex: a #GdaMutex
  *
- * Unlocks @m. If another thread is blocked in a gda_mutex_lock() call for @m, it will be woken and can lock @m itself.
+ * Unlocks @mutex. If another thread is blocked in a gda_mutex_lock() call for @mutex, it wil
+ * be woken and can lock @mutex itself.
  * This function can be used even if g_thread_init() has not yet been called, and, in that case, will do nothing. 
  */
 void
-gda_mutex_unlock (GdaMutex *m)
+gda_mutex_unlock (GdaMutex *mutex)
 {
 	if (impl_status == RECURSIVE)
-		g_mutex_unlock (m->mutex);
+		g_mutex_unlock (mutex->mutex);
 	else if (impl_status == NON_SUPPORTED)
 		return;
 	else {
 		GThread *th = g_thread_self ();
-		g_mutex_lock (m->mutex);
-		g_assert (th == m->owner);
-		m->depth--;
-                if (m->depth == 0) {
-                        m->owner = NULL;
-			g_cond_signal (m->cond);
+		g_mutex_lock (mutex->mutex);
+		g_assert (th == mutex->owner);
+		mutex->depth--;
+                if (mutex->depth == 0) {
+                        mutex->owner = NULL;
+			g_cond_signal (mutex->cond);
                 }
-		g_mutex_unlock (m->mutex);
+		g_mutex_unlock (mutex->mutex);
 	}
 }
 
 /**
  * gda_mutex_free
- * @m: a #GdaMutex
+ * @mutex: a #GdaMutex
  *
- * Destroys @m.
+ * Destroys @mutex.
  */
 void
-gda_mutex_free (GdaMutex *m)
+gda_mutex_free (GdaMutex *mutex)
 {
-	g_assert (m);
-	if (m->cond)
-		g_cond_free (m->cond);
-	m->cond = NULL;
-	if (m->mutex)
-		g_mutex_free (m->mutex);
-	m->mutex = NULL;
-	g_free (m);
+	g_assert (mutex);
+	if (mutex->cond)
+		g_cond_free (mutex->cond);
+	mutex->cond = NULL;
+	if (mutex->mutex)
+		g_mutex_free (mutex->mutex);
+	mutex->mutex = NULL;
+	g_free (mutex);
 }

Modified: trunk/libgda/gda-value.c
==============================================================================
--- trunk/libgda/gda-value.c	(original)
+++ trunk/libgda/gda-value.c	Tue Jan 27 20:59:09 2009
@@ -759,7 +759,7 @@
 
 /**
  * gda_numeric_free
- * @boxed:
+ * @boxed: a #GdaNumeric pointer
  *
  * Deallocates all memory associated to the given @boxed
  */



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