Skip to content

Commit

Permalink
Fix prototyping issue in AutoXS.h
Browse files Browse the repository at this point in the history
  • Loading branch information
smueller@cpan.org committed May 17, 2009
1 parent 1ba6c65 commit 4df14f0
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 5 deletions.
3 changes: 3 additions & 0 deletions AutoXS-Header/Changes
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
6 changes: 3 additions & 3 deletions AutoXS-Header/README
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -24,7 +24,7 @@ AUTHOR
Steffen Mueller, <smueller@cpan.org>

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
Expand Down
17 changes: 15 additions & 2 deletions AutoXS-Header/lib/AutoXS/Header.pm
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use 5.006;
use strict;
use warnings;

our $VERSION = '0.06';
our $VERSION = '1.00';

sub WriteAutoXSHeader {
my $filename = shift;
Expand All @@ -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;
Expand All @@ -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)
Expand Down Expand Up @@ -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
}

Expand Down

0 comments on commit 4df14f0

Please sign in to comment.