gobjectification: 0dcd4370: Update Perl modules for new PurpleHash t...
qulogic at pidgin.im
qulogic at pidgin.im
Sun Nov 8 03:30:57 EST 2009
-----------------------------------------------------------------
Revision: 0dcd437058e5ff7ed942547e48fb39f1c67c4723
Ancestor: 7393f8bf7c2cf635e3eebd7e5f4fd9f85c56c275
Author: qulogic at pidgin.im
Date: 2009-11-08T02:39:19
Branch: im.pidgin.gobjectification
URL: http://d.pidgin.im/viewmtn/revision/info/0dcd437058e5ff7ed942547e48fb39f1c67c4723
Added files:
libpurple/plugins/perl/common/Hash.xs
Modified files:
libpurple/plugins/perl/common/Cipher.xs
libpurple/plugins/perl/common/MANIFEST
libpurple/plugins/perl/common/Makefile.mingw
libpurple/plugins/perl/common/module.h
libpurple/plugins/perl/common/typemap
ChangeLog:
Update Perl modules for new PurpleHash type.
-------------- next part --------------
============================================================
--- libpurple/plugins/perl/common/Hash.xs 3d753876c0251501303c113def9d37bf98aa6700
+++ libpurple/plugins/perl/common/Hash.xs 3d753876c0251501303c113def9d37bf98aa6700
@@ -0,0 +1,88 @@
+#include "module.h"
+
+MODULE = Purple::Hash PACKAGE = Purple::Hash PREFIX = purple_hash_
+PROTOTYPES: ENABLE
+
+void
+purple_hash_reset(hash)
+ Purple::Hash hash
+
+void
+purple_hash_set_iv(Purple::Hash hash, guchar *iv, size_t length(iv))
+ PROTOTYPE: $$
+
+void
+purple_hash_append(Purple::Hash hash, guchar *data, size_t length(data))
+ PROTOTYPE: $$
+
+size_t
+purple_hash_digest(hash, in_len, digest)
+ Purple::Hash hash
+ size_t in_len
+ SV *digest
+ PREINIT:
+ gboolean ret;
+ guchar *buff = NULL;
+ CODE:
+ (void)SvUPGRADE(digest, SVt_PV);
+ buff = (guchar *)SvGROW(digest, in_len);
+ ret = purple_hash_digest(hash, in_len, buff, &RETVAL);
+ if(!ret) {
+ SvSetSV_nosteal(digest, &PL_sv_undef);
+ XSRETURN_UNDEF;
+ }
+ SvCUR_set(digest, RETVAL);
+ SvPOK_only(digest);
+ OUTPUT:
+ RETVAL
+
+size_t
+purple_hash_digest_to_str(hash, in_len, digest_s)
+ Purple::Hash hash
+ size_t in_len
+ SV *digest_s
+ PREINIT:
+ gboolean ret;
+ gchar *buff = NULL;
+ CODE:
+ in_len += 1; /* perl shouldn't need to care about '\0' at the end */
+ (void)SvUPGRADE(digest_s, SVt_PV);
+ buff = SvGROW(digest_s, in_len);
+ ret = purple_hash_digest_to_str(hash, in_len, buff, &RETVAL);
+ if(!ret) {
+ SvSetSV_nosteal(digest_s, &PL_sv_undef);
+ XSRETURN_UNDEF;
+ }
+ SvCUR_set(digest_s, RETVAL);
+ SvPOK_only(digest_s);
+ OUTPUT:
+ RETVAL
+
+void
+purple_hash_set_salt(hash, salt)
+ Purple::Hash hash
+ guchar * salt
+
+size_t
+purple_hash_get_salt_size(hash);
+ Purple::Hash hash
+
+void
+purple_hash_set_key(hash, key)
+ Purple::Hash hash
+ const guchar * key
+
+size_t
+purple_hash_get_key_length(hash)
+ Purple::Hash hash
+
+void
+purple_hash_set_key_with_length(Purple::Hash hash, guchar *key, size_t length(key))
+ PROTOTYPE: $$
+
+MODULE = Purple::Hash PACKAGE = Purple::MD4Hash PREFIX = purple_md4_hash_
+PROTOTYPES: ENABLE
+
+Purple::Hash
+purple_md4_hash_new()
+
============================================================
--- libpurple/plugins/perl/common/Cipher.xs 848afb793099cef31f30c945af891b708126984d
+++ libpurple/plugins/perl/common/Cipher.xs 1144fc8411a80aa32117323818d49377de87fefd
@@ -159,27 +159,12 @@ purple_cipher_set_key_with_len(Purple::C
purple_cipher_set_key_with_len(Purple::Cipher cipher, guchar *key, size_t length(key))
PROTOTYPE: $$
-void
-purple_cipher_set_hash(cipher, hash);
- Purple::Cipher cipher
- Purple::Cipher hash
-
-Purple::Cipher
-purple_cipher_get_hash(cipher)
- Purple::Cipher cipher
-
MODULE = Purple::Cipher PACKAGE = Purple::DESCipher PREFIX = purple_des_cipher_
PROTOTYPES: ENABLE
Purple::Cipher
purple_des_cipher_new()
-MODULE = Purple::Cipher PACKAGE = Purple::MD4Cipher PREFIX = purple_md4_cipher_
-PROTOTYPES: ENABLE
-
-Purple::Cipher
-purple_md4_cipher_new()
-
MODULE = Purple::Cipher PACKAGE = Purple::MD5Cipher PREFIX = purple_md5_cipher_
PROTOTYPES: ENABLE
@@ -196,7 +181,8 @@ Purple::Cipher
PROTOTYPES: ENABLE
Purple::Cipher
-purple_hmac_cipher_new()
+purple_hmac_cipher_new(cipher)
+ Purple::Cipher cipher
MODULE = Purple::Cipher PACKAGE = Purple::RC4Cipher PREFIX = purple_rc4_cipher_
PROTOTYPES: ENABLE
============================================================
--- libpurple/plugins/perl/common/MANIFEST b568b3bdac66d26d776b645ed17b0980d3ebdae8
+++ libpurple/plugins/perl/common/MANIFEST e810ec4e793f6c17f0d9b423d7d2d601f2fc5934
@@ -8,6 +8,7 @@ FT.xs
Conversation.xs
Debug.xs
FT.xs
+Hash.xs
ImgStore.xs
Log.xs
Makefile.PL
============================================================
--- libpurple/plugins/perl/common/Makefile.mingw fc00e34aa100760011bc7f260d46d22a80f1becb
+++ libpurple/plugins/perl/common/Makefile.mingw 6888182946cc7656bc163020e55063d29a29e0fc
@@ -45,6 +45,7 @@ XS_FILES = Account.xs \
Core.xs \
Debug.xs \
FT.xs \
+ Hash.xs \
Idle.xs \
Purple.xs \
ImgStore.xs \
============================================================
--- libpurple/plugins/perl/common/module.h a6ee78b4fde2783f4d71d49b754f2efcdc31cd70
+++ libpurple/plugins/perl/common/module.h 4d5682acf3c48de4a1771a7118b8e1558529656c
@@ -41,6 +41,7 @@ typedef struct group *Purple__Group;
#include "gtkutils.h"
#endif
#include "idle.h"
+#include "hash.h"
#include "hmaccipher.h"
#include "imgstore.h"
#include "md4hash.h"
@@ -99,6 +100,7 @@ typedef PurpleCipherBatchMode Purple__Ci
/* cipher.h */
typedef PurpleCipher * Purple__Cipher;
typedef PurpleCipherBatchMode Purple__Cipher__BatchMode;
+typedef PurpleHash * Purple__Hash;
/* cmds.h */
typedef PurpleCmdFlag Purple__Cmd__Flag;
============================================================
--- libpurple/plugins/perl/common/typemap c37d01291f29f2ff9863e0eee9a2cce1263cfa09
+++ libpurple/plugins/perl/common/typemap 0e79970d942c439f49e96e64157e6329e3ef1e34
@@ -70,6 +70,7 @@ Purple::Handle T_PurpleObj
Purple::DesktopItemType T_IV
Purple::Handle T_PurpleObj
+Purple::Hash T_PurpleObj
Purple::IconScaleRules T_IV
More information about the Commits
mailing list