From 4df14f00588369d45a9b11ebe0ee6f8bb673600f Mon Sep 17 00:00:00 2001 From: "smueller@cpan.org" Date: Sun, 17 May 2009 09:18:09 +0000 Subject: [PATCH] Fix prototyping issue in AutoXS.h --- AutoXS-Header/Changes | 3 +++ AutoXS-Header/README | 6 +++--- AutoXS-Header/lib/AutoXS/Header.pm | 17 +++++++++++++++-- 3 files changed, 21 insertions(+), 5 deletions(-) diff --git a/AutoXS-Header/Changes b/AutoXS-Header/Changes index a688572ca..e98c413a7 100644 --- a/AutoXS-Header/Changes +++ b/AutoXS-Header/Changes @@ -1,5 +1,8 @@ Revision history for Perl extension AutoXS-Header. +1.00 Sun May 17 11:16 2009 + - Fix prototype issue in previous release. + 0.06 Sat May 16 13:40 2009 * Incompatible API change! * - Add reverse association containers. diff --git a/AutoXS-Header/README b/AutoXS-Header/README index da991482f..1ad3d9875 100644 --- a/AutoXS-Header/README +++ b/AutoXS-Header/README @@ -3,11 +3,11 @@ NAME SYNOPSIS # potentially in your Makefile.PL - sub MY::post_initialize{ + sub MY::post_constants { # Write header as AutoXS.h in current directory return <<'MAKE_FRAG'; linkext :: - $(PERL) -MAutoXS::Header -e 'AutoXS::Header::WriteAutoXSHeader()' + $(PERL) -MAutoXS::Header -e AutoXS::Header::WriteAutoXSHeader # note the tab character in the previous line! MAKE_FRAG @@ -24,7 +24,7 @@ AUTHOR Steffen Mueller, COPYRIGHT AND LICENSE - Copyright (C) 2008 by Steffen Mueller + Copyright (C) 2008-2009 by Steffen Mueller This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8 or, at your diff --git a/AutoXS-Header/lib/AutoXS/Header.pm b/AutoXS-Header/lib/AutoXS/Header.pm index 02e54bcc1..6363d59bc 100644 --- a/AutoXS-Header/lib/AutoXS/Header.pm +++ b/AutoXS-Header/lib/AutoXS/Header.pm @@ -4,7 +4,7 @@ use 5.006; use strict; use warnings; -our $VERSION = '0.06'; +our $VERSION = '1.00'; sub WriteAutoXSHeader { my $filename = shift; @@ -21,6 +21,17 @@ typedef struct { SV* key; } autoxs_hashkey; +/* prototype section */ + +I32 get_hashkey_index(const char* key, const I32 len); +I32 _new_hashkey(); +void _resize_array(I32** array, unsigned int* len, unsigned int newlen); +void _resize_array_init(I32** array, unsigned int* len, unsigned int newlen, I32 init); +I32 _new_internal_arrayindex(); +I32 get_internal_array_index(I32 object_ary_idx); + +/* initialization section */ + unsigned int AutoXS_no_hashkeys = 0; unsigned int AutoXS_free_hashkey_no = 0; autoxs_hashkey* AutoXS_hashkeys = NULL; @@ -33,6 +44,9 @@ I32* AutoXS_arrayindices = NULL; unsigned int AutoXS_reverse_arrayindices_length = 0; I32* AutoXS_reverse_arrayindices = NULL; + +/* implementation section */ + I32 get_hashkey_index(const char* key, const I32 len) { /* init */ if (AutoXS_reverse_hashkeys == NULL) @@ -125,7 +139,6 @@ I32 get_internal_array_index(I32 object_ary_idx) { AutoXS_reverse_arrayindices[object_ary_idx] = new_index; return new_index; } - AUTOXSHEADERHEREDOC }