Sync up with Digest-MD5-2.38 from CPAN
[p5sagit/p5-mst-13.2.git] / ext / Digest / MD5 / MD5.xs
index 1075774..a743b05 100644 (file)
@@ -1,5 +1,3 @@
-/* $Id: MD5.xs,v 1.45 2005/11/26 11:06:20 gisle Exp $ */
-
 /* 
  * This library is free software; you can redistribute it and/or
  * modify it under the same terms as Perl itself.
@@ -711,6 +709,11 @@ md5(...)
                if (len == 11 && memEQ("Digest::MD5", data, 11)) {
                    msg = "probably called as class method";
                }
+               else if (SvROK(ST(0))) {
+                   SV* sv = SvRV(ST(0));
+                   if (SvOBJECT(sv) && strEQ(HvNAME(SvSTASH(sv)), "Digest::MD5"))
+                       msg = "probably called as method";
+               }
            }
            if (msg) {
                const char *f = (ix == F_BIN) ? "md5" :