gobjectification: b9a2ab40: Oops, I guess we don't need a finalize f...

qulogic at pidgin.im qulogic at pidgin.im
Sun Jul 11 04:05:53 EDT 2010


----------------------------------------------------------------------
Revision: b9a2ab409c1de08f513f62c2b2e25e3777548be4
Parent:   fc316d25eaff16642283ce1a8fc6069a902eb1db
Author:   qulogic at pidgin.im
Date:     07/11/10 02:03:31
Branch:   im.pidgin.gobjectification
URL: http://d.pidgin.im/viewmtn/revision/info/b9a2ab409c1de08f513f62c2b2e25e3777548be4

Changelog: 

Oops, I guess we don't need a finalize function either.

Changes against parent fc316d25eaff16642283ce1a8fc6069a902eb1db

  patched  libpurple/cipher/md5hash.c
  patched  libpurple/cipher/sha1hash.c
  patched  libpurple/cipher/sha256hash.c

-------------- next part --------------
============================================================
--- libpurple/cipher/md5hash.c	95f88683577ae30ca8e22b76e254e788a6348b5e
+++ libpurple/cipher/md5hash.c	52f2969fb31adcd2b035156e08982eebc15cc8f1
@@ -265,23 +265,9 @@ purple_md5_hash_digest(PurpleHash *hash,
 /******************************************************************************
  * Object Stuff
  *****************************************************************************/
-#if !GLIB_CHECK_VERSION(2,16,0)
 static void
-purple_md5_hash_finalize(GObject *obj) {
-	PurpleHash *hash = PURPLE_HASH(obj);
-	PurpleMD5HashPrivate *priv = PURPLE_MD5_HASH_GET_PRIVATE(obj);
-
-	/* reset the hash so we don't leave any data around... */
-	purple_md5_hash_reset(hash);
-
-	g_free(priv);
-}
-#endif /* GLIB_CHECK_VERSION(2,16,0) */
-
-static void
 purple_md5_hash_class_init(PurpleMD5HashClass *klass) {
 #if !GLIB_CHECK_VERSION(2,16,0)
-	GObjectClass *obj_class = G_OBJECT_CLASS(klass);
 	PurpleHashClass *hash_class = PURPLE_HASH_CLASS(klass);
 #endif
 
@@ -290,8 +276,6 @@ purple_md5_hash_class_init(PurpleMD5Hash
 #if !GLIB_CHECK_VERSION(2,16,0)
 	g_type_class_add_private(klass, sizeof(PurpleMD5HashPrivate));
 
-	obj_class->finalize = purple_md5_hash_finalize;
-
 	hash_class->reset = purple_md5_hash_reset;
 	hash_class->append = purple_md5_hash_append;
 	hash_class->digest = purple_md5_hash_digest;
============================================================
--- libpurple/cipher/sha1hash.c	4ee7e373d3288464391b4fb52828aacb99402ea9
+++ libpurple/cipher/sha1hash.c	a017ee80ca167035092537b92ea05faa23de4204
@@ -199,23 +199,9 @@ purple_sha1_hash_digest(PurpleHash *hash
 /******************************************************************************
  * Object Stuff
  *****************************************************************************/
-#if !GLIB_CHECK_VERSION(2,16,0)
 static void
-purple_sha1_hash_finalize(GObject *obj) {
-	PurpleHash *hash = PURPLE_HASH(obj);
-	PurpleSHA1HashPrivate *priv = PURPLE_SHA1_HASH_GET_PRIVATE(obj);
-
-	/* reset the hash so we don't leave any data around... */
-	purple_sha1_hash_reset(hash);
-
-	g_free(priv);
-}
-#endif /* !GLIB_CHECK_VERSION(2,16,0) */
-
-static void
 purple_sha1_hash_class_init(PurpleSHA1HashClass *klass) {
 #if !GLIB_CHECK_VERSION(2,16,0)
-	GObjectClass *obj_class = G_OBJECT_CLASS(klass);
 	PurpleHashClass *hash_class = PURPLE_HASH_CLASS(klass);
 #endif
 
@@ -224,8 +210,6 @@ purple_sha1_hash_class_init(PurpleSHA1Ha
 #if !GLIB_CHECK_VERSION(2,16,0)
 	g_type_class_add_private(klass, sizeof(PurpleSHA1HashPrivate));
 
-	obj_class->finalize = purple_sha1_hash_finalize;
-
 	hash_class->reset = purple_sha1_hash_reset;
 	hash_class->append = purple_sha1_hash_append;
 	hash_class->digest = purple_sha1_hash_digest;
============================================================
--- libpurple/cipher/sha256hash.c	ff353108a9e91ce1bdb74c6d17a860396e23a366
+++ libpurple/cipher/sha256hash.c	381037a919be4ea070d8a350ae896ea2bc751282
@@ -209,24 +209,9 @@ purple_sha256_hash_digest(PurpleHash *ha
 /******************************************************************************
  * Object Stuff
  *****************************************************************************/
-#if !GLIB_CHECK_VERSION(2,16,0)
 static void
-purple_sha256_hash_finalize(GObject *obj)
-{
-	PurpleHash *hash = PURPLE_HASH(obj);
-	PurpleSHA256HashPrivate *priv = PURPLE_SHA256_HASH_GET_PRIVATE(obj);
-
-	/* reset the hash so we don't leave any data around... */
-	purple_sha256_hash_reset(hash);
-
-	g_free(priv);
-}
-#endif /* !GLIB_CHECK_VERSION(2,16,0) */
-
-static void
 purple_sha256_hash_class_init(PurpleSHA256HashClass *klass) {
 #if !GLIB_CHECK_VERSION(2,16,0)
-	GObjectClass *obj_class = G_OBJECT_CLASS(klass);
 	PurpleHashClass *hash_class = PURPLE_HASH_CLASS(klass);
 #endif
 
@@ -235,8 +220,6 @@ purple_sha256_hash_class_init(PurpleSHA2
 #if !GLIB_CHECK_VERSION(2,16,0)
 	g_type_class_add_private(klass, sizeof(PurpleSHA256HashPrivate));
 
-	obj_class->finalize = purple_sha256_hash_finalize;
-
 	hash_class->reset = purple_sha256_hash_reset;
 	hash_class->append = purple_sha256_hash_append;
 	hash_class->digest = purple_sha256_hash_digest;


More information about the Commits mailing list