Index: includes/database.mysql.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/Attic/database.mysql.inc,v
retrieving revision 1.89.2.4
diff -u -p -r1.89.2.4 database.mysql.inc
--- includes/database.mysql.inc	15 Dec 2010 20:41:10 -0000	1.89.2.4
+++ includes/database.mysql.inc	10 Jan 2011 20:28:57 -0000
@@ -143,13 +143,15 @@ function _db_query($query, $debug = 0) {
  *
  * @param $result
  *   A database query result resource, as returned from db_query().
+ * @param $class_name
+ *   Class name to type-cast the DB row to.
  * @return
  *   An object representing the next row of the result, or FALSE. The attributes
  *   of this object are the table fields selected by the query.
  */
-function db_fetch_object($result) {
+function db_fetch_object($result, $class_name = NULL) {
   if ($result) {
-    return mysql_fetch_object($result);
+    return mysql_fetch_object($result, $class_name);
   }
 }
 
Index: includes/database.mysqli.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/Attic/database.mysqli.inc,v
retrieving revision 1.54.2.4
diff -u -p -r1.54.2.4 database.mysqli.inc
--- includes/database.mysqli.inc	15 Dec 2010 20:41:10 -0000	1.54.2.4
+++ includes/database.mysqli.inc	10 Jan 2011 20:28:58 -0000
@@ -142,13 +142,15 @@ function _db_query($query, $debug = 0) {
  *
  * @param $result
  *   A database query result resource, as returned from db_query().
+ * @param $classname
+ *   Class name to type-cast the DB row to.
  * @return
  *   An object representing the next row of the result, or FALSE. The attributes
  *   of this object are the table fields selected by the query.
  */
-function db_fetch_object($result) {
+function db_fetch_object($result, $class_name = NULL) {
   if ($result) {
-    $object = mysqli_fetch_object($result);
+    $object = mysqli_fetch_object($result, $class_name);
     return isset($object) ? $object : FALSE;
   }
 }
Index: includes/database.pgsql.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/Attic/database.pgsql.inc,v
retrieving revision 1.68.2.11
diff -u -p -r1.68.2.11 database.pgsql.inc
--- includes/database.pgsql.inc	15 Dec 2010 20:41:10 -0000	1.68.2.11
+++ includes/database.pgsql.inc	10 Jan 2011 20:28:58 -0000
@@ -167,13 +167,15 @@ function _db_query($query, $debug = 0) {
  *
  * @param $result
  *   A database query result resource, as returned from db_query().
+ * @param $class_name
+ *   Class name to type-cast the DB row to.
  * @return
  *   An object representing the next row of the result, or FALSE. The attributes
  *   of this object are the table fields selected by the query.
  */
-function db_fetch_object($result) {
+function db_fetch_object($result, $class_name = NULL) {
   if ($result) {
-    return pg_fetch_object($result);
+    return pg_fetch_object($result, NULL, $class_name);
   }
 } 
