Subject: | INIT: section isn't a place to declare variables. |
Dear Andrew,
As you can see from my cpan-testers report #3736216, the tests look like success.
However, as a matter of fact, that is the result of replacing every INIT: section in
Eksblowfish.xs with PREINIT: section, because INIT: section as-is caused the compilation
failure under at least my compiler, MS VC++ 7.0.
INIT: section isn't a place to declare variables. You could place the declarations in PREINIT:
section as follows:
--- Eksblowfish.xs.orig Wed Apr 22 04:08:47 2009
+++ Eksblowfish.xs Wed Apr 22 04:11:04 2009
@@ -603,7 +603,7 @@
SV *
p_array(Crypt::Eksblowfish::Subkeyed ks)
-INIT:
+PREINIT:
AV *rka;
int i;
CODE:
@@ -618,7 +618,7 @@
SV *
s_boxes(Crypt::Eksblowfish::Subkeyed ks)
-INIT:
+PREINIT:
AV *aa, *ab;
int i, j;
CODE:
@@ -638,7 +638,7 @@
bool
is_weak(Crypt::Eksblowfish::Subkeyed ks)
-INIT:
+PREINIT:
int s, i, j;
CODE:
RETVAL = 0;
@@ -664,7 +664,7 @@
Crypt::Eksblowfish::Subkeyed
new_from_subkeys(SV *class, SV *parray_sv, SV *sboxes_sv)
-INIT:
+PREINIT:
AV *parray, *sboxes;
int i, j;
CODE:
@@ -729,7 +729,7 @@
Crypt::Eksblowfish
new(SV *class, unsigned cost, SV *salt_sv, SV *key_sv)
-INIT:
+PREINIT:
STRLEN salt_len, key_len;
U8 *salt_octets, *key_octets;
bool salt_tofree, key_tofree;
@@ -760,7 +760,7 @@
Crypt::Eksblowfish::Blowfish
new(SV *class, SV *key_sv)
-INIT:
+PREINIT:
STRLEN key_len;
U8 *key_octets;
bool key_tofree;
@@ -780,7 +780,7 @@
Crypt::Eksblowfish::Uklblowfish
new(SV *class, SV *key_sv)
-INIT:
+PREINIT:
STRLEN key_len;
U8 *key_octets;
bool key_tofree;
Best regards,
Taro Nishino