r44428 - in /branches/upstream/libextutils-parsexs-perl/current: Build.PL Changes MANIFEST META.yml Makefile.PL README lib/ExtUtils/ParseXS.pm t/bugs/ t/bugs/RT48104.xs t/bugs/typemap t/include/ t/include/nsUniversalDetector.h t/include/nscore.h
jawnsy-guest at users.alioth.debian.org
jawnsy-guest at users.alioth.debian.org
Sun Sep 20 18:16:24 UTC 2009
Author: jawnsy-guest
Date: Sun Sep 20 18:16:18 2009
New Revision: 44428
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=44428
Log:
[svn-upgrade] Integrating new upstream version, libextutils-parsexs-perl (2.200401)
Added:
branches/upstream/libextutils-parsexs-perl/current/t/bugs/
branches/upstream/libextutils-parsexs-perl/current/t/bugs/RT48104.xs
branches/upstream/libextutils-parsexs-perl/current/t/bugs/typemap
branches/upstream/libextutils-parsexs-perl/current/t/include/
branches/upstream/libextutils-parsexs-perl/current/t/include/nsUniversalDetector.h
branches/upstream/libextutils-parsexs-perl/current/t/include/nscore.h
Modified:
branches/upstream/libextutils-parsexs-perl/current/Build.PL
branches/upstream/libextutils-parsexs-perl/current/Changes
branches/upstream/libextutils-parsexs-perl/current/MANIFEST
branches/upstream/libextutils-parsexs-perl/current/META.yml
branches/upstream/libextutils-parsexs-perl/current/Makefile.PL
branches/upstream/libextutils-parsexs-perl/current/README
branches/upstream/libextutils-parsexs-perl/current/lib/ExtUtils/ParseXS.pm
Modified: branches/upstream/libextutils-parsexs-perl/current/Build.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libextutils-parsexs-perl/current/Build.PL?rev=44428&op=diff
==============================================================================
--- branches/upstream/libextutils-parsexs-perl/current/Build.PL (original)
+++ branches/upstream/libextutils-parsexs-perl/current/Build.PL Sun Sep 20 18:16:18 2009
@@ -5,33 +5,41 @@
sub do_create_makefile_pl {
my $self = shift;
$self->SUPER::do_create_makefile_pl(fh => $fh);
- $self->do_system(qw(perl -pi -e), q{s/'INSTALLDIRS' => '\w+'/'INSTALLDIRS' => (\$] >= 5.009003 ? 'perl' : 'site')/}, 'Makefile.PL');
+ $self->do_system(qw(perl -pi -e), q{s/'INSTALLDIRS' => '\w+'/'INSTALLDIRS' => (\$] < 5.008009 ? 'site' : 'perl')/}, 'Makefile.PL');
}
EOF
my $build = $class->new
- (
- module_name => 'ExtUtils::ParseXS',
- license => 'perl',
- installdirs => ($] >= 5.009003 ? 'core' : 'site'),
- auto_configure_requires => 0,
- requires => {
- 'Cwd' => 0,
- 'Exporter' => 0,
- 'File::Basename' => 0,
- 'File::Spec' => 0,
- 'Symbol' => 0,
- },
- build_requires => {
- 'Carp' => 0,
- 'DynaLoader' => 0,
- 'ExtUtils::CBuilder' => 0,
- 'Test::More' => 0.47,
- },
- add_to_cleanup => ["t/XSTest.c", "t/XSTest$Config{obj_ext}", "t/XSTest.$Config{dlext}"],
- create_makefile_pl => 'traditional',
- create_readme => 1,
- );
+(
+ module_name => 'ExtUtils::ParseXS',
+ license => 'perl',
+ installdirs => ($] < 5.008009 ? 'site' : 'core'),
+ auto_configure_requires => 0,
+ requires => {
+ 'Cwd' => 0,
+ 'Exporter' => 0,
+ 'File::Basename' => 0,
+ 'File::Spec' => 0,
+ 'Symbol' => 0,
+ },
+ build_requires => {
+ 'Carp' => 0,
+ 'DynaLoader' => 0,
+ 'ExtUtils::CBuilder' => 0,
+ 'Test::More' => 0.47,
+ },
+ add_to_cleanup => ["t/XSTest.c", "t/XSTest$Config{obj_ext}", "t/XSTest.$Config{dlext}"],
+ create_makefile_pl => 'traditional',
+ create_readme => 1,
+ meta_merge => {
+ resources => {
+ bugtracker =>
+ 'http://rt.cpan.org/Dist/Display.html?Queue=ExtUtils-ParseXS',
+ MailingList => 'mailto:perl5-porters at perl.org',
+ repository => 'git://github.com/dagolden/extutils-parsexs.git'
+ }
+ },
+);
$build->create_build_script;
Modified: branches/upstream/libextutils-parsexs-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libextutils-parsexs-perl/current/Changes?rev=44428&op=diff
==============================================================================
--- branches/upstream/libextutils-parsexs-perl/current/Changes (original)
+++ branches/upstream/libextutils-parsexs-perl/current/Changes Sun Sep 20 18:16:18 2009
@@ -1,4 +1,25 @@
Revision history for Perl extension ExtUtils::ParseXS.
+
+2.200401 - Mon Sep 14 22:26:03 EDT 2009
+
+ - No changes from 2.20_04.
+
+2.20_04 - Mon Aug 10 11:18:47 EDT 2009
+
+ Bug fixes:
+ - Changed install_dirs to 'core' for 5.8.9 as well (RT#48474)
+ - Removed t/bugs.t until there is better C++ support in ExtUtils::CBuilder
+
+ Other:
+ - Updated repository URL in META file
+
+2.20_03 - Thu Jul 23 23:14:50 EDT 2009
+
+ Bug fixes:
+ - Fixed "const char *" errors for 5.8.8 (and older) (RT#48104)
+ [Vincent Pit]
+ - Added newline before a preprocessor directive (RT#30673)
+ [patch by hjp]
2.2002 - Sat Jul 18 17:22:27 EDT 2009
Modified: branches/upstream/libextutils-parsexs-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libextutils-parsexs-perl/current/MANIFEST?rev=44428&op=diff
==============================================================================
--- branches/upstream/libextutils-parsexs-perl/current/MANIFEST (original)
+++ branches/upstream/libextutils-parsexs-perl/current/MANIFEST Sun Sep 20 18:16:18 2009
@@ -8,6 +8,10 @@
META.yml Module meta-data (added by MakeMaker)
README
t/basic.t
+t/bugs/RT48104.xs
+t/bugs/typemap
+t/include/nscore.h
+t/include/nsUniversalDetector.h
t/usage.t
t/XSTest.pm
t/XSTest.xs
Modified: branches/upstream/libextutils-parsexs-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libextutils-parsexs-perl/current/META.yml?rev=44428&op=diff
==============================================================================
--- branches/upstream/libextutils-parsexs-perl/current/META.yml (original)
+++ branches/upstream/libextutils-parsexs-perl/current/META.yml Sun Sep 20 18:16:18 2009
@@ -1,12 +1,15 @@
---
name: ExtUtils-ParseXS
-version: 2.2002
+version: 2.200401
author:
- 'Maintained by Ken Williams, <ken at mathforum.org>'
abstract: converts Perl XS code into C code
license: perl
resources:
+ MailingList: mailto:perl5-porters at perl.org
+ bugtracker: http://rt.cpan.org/Dist/Display.html?Queue=ExtUtils-ParseXS
license: http://dev.perl.org/licenses/
+ repository: git://github.com/dagolden/extutils-parsexs.git
build_requires:
Carp: 0
DynaLoader: 0
@@ -21,8 +24,8 @@
provides:
ExtUtils::ParseXS:
file: lib/ExtUtils/ParseXS.pm
- version: 2.2002
-generated_by: Module::Build version 0.34
+ version: 2.200401
+generated_by: Module::Build version 0.3502
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
version: 1.4
Modified: branches/upstream/libextutils-parsexs-perl/current/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libextutils-parsexs-perl/current/Makefile.PL?rev=44428&op=diff
==============================================================================
--- branches/upstream/libextutils-parsexs-perl/current/Makefile.PL (original)
+++ branches/upstream/libextutils-parsexs-perl/current/Makefile.PL Sun Sep 20 18:16:18 2009
@@ -1,9 +1,9 @@
-# Note: this file was auto-generated by Module::Build::Compat version 0.34
+# Note: this file was auto-generated by Module::Build::Compat version 0.35_02
use ExtUtils::MakeMaker;
WriteMakefile
(
'PL_FILES' => {},
- 'INSTALLDIRS' => ($] >= 5.009003 ? 'perl' : 'site'),
+ 'INSTALLDIRS' => ($] < 5.008009 ? 'site' : 'perl'),
'NAME' => 'ExtUtils::ParseXS',
'EXE_FILES' => [],
'VERSION_FROM' => 'lib/ExtUtils/ParseXS.pm',
Modified: branches/upstream/libextutils-parsexs-perl/current/README
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libextutils-parsexs-perl/current/README?rev=44428&op=diff
==============================================================================
--- branches/upstream/libextutils-parsexs-perl/current/README (original)
+++ branches/upstream/libextutils-parsexs-perl/current/README Sun Sep 20 18:16:18 2009
@@ -3,8 +3,8 @@
SYNOPSIS
use ExtUtils::ParseXS qw(process_file);
-
- process_file( filename => 'foo.xs' );
+
+ process_file( filename => 'foo.xs' );
process_file( filename => 'foo.xs',
output => 'bar.c',
@@ -20,7 +20,7 @@
);
=head1 DESCRIPTION
- "ExtUtils::ParseXS" will compile XS code into C code by embedding the
+ `ExtUtils::ParseXS' will compile XS code into C code by embedding the
constructs necessary to let C functions manipulate Perl values and
creates the glue necessary to let Perl access those functions. The
compiler uses typemaps to determine how to map C function parameters and
@@ -33,7 +33,7 @@
../../../typemap:../../typemap:../typemap:typemap
EXPORT
- None by default. "process_file()" may be exported upon request.
+ None by default. `process_file()' may be exported upon request.
FUNCTIONS
process_xs()
@@ -41,10 +41,10 @@
Named parameters control how the processing is done. The following
parameters are accepted:
- C++ Adds "extern "C"" to the C code. Default is false.
+ C++ Adds `extern "C"' to the C code. Default is false.
hiertype
- Retains "::" in type names so that C++ hierachical types can be
+ Retains `::' in type names so that C++ hierachical types can be
mapped. Default is false.
except
@@ -61,11 +61,11 @@
versioncheck
Makes sure at run time that the object file (derived from the
- ".xs" file) and the ".pm" files have the same version number.
+ `.xs' file) and the `.pm' files have the same version number.
Default is true.
linenumbers
- Adds "#line" directives to the C output so error messages will
+ Adds `#line' directives to the C output so error messages will
look like they came from the original XS file. Default is true.
optimize
@@ -76,7 +76,7 @@
operated. Default is to optimize.
inout
- Enable recognition of "IN", "OUT_LIST" and "INOUT_LIST"
+ Enable recognition of `IN', `OUT_LIST' and `INOUT_LIST'
declarations. Default is true.
argtypes
Modified: branches/upstream/libextutils-parsexs-perl/current/lib/ExtUtils/ParseXS.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libextutils-parsexs-perl/current/lib/ExtUtils/ParseXS.pm?rev=44428&op=diff
==============================================================================
--- branches/upstream/libextutils-parsexs-perl/current/lib/ExtUtils/ParseXS.pm (original)
+++ branches/upstream/libextutils-parsexs-perl/current/lib/ExtUtils/ParseXS.pm Sun Sep 20 18:16:18 2009
@@ -18,7 +18,7 @@
my($XSS_work_idx, $cpp_next_tmp);
use vars qw($VERSION);
-$VERSION = '2.2002';
+$VERSION = '2.200401';
use vars qw(%input_expr %output_expr $ProtoUsed @InitFileCode $FH $proto_re $Overload $errors $Fallback
$cplusplus $hiertype $WantPrototypes $WantVersionChk $except $WantLineNumbers
@@ -555,7 +555,7 @@
my $arg0 = ((defined($static) or $func_name eq 'new')
? "CLASS" : "THIS");
unshift(@args, $arg0);
- ($report_args = "$arg0, $report_args") =~ s/^\w+, $/$arg0/;
+# ($report_args = "$arg0, $report_args") =~ s/^\w+, $/$arg0/;
}
my $extra_args = 0;
@args_num = ();
@@ -976,10 +976,19 @@
##endif
EOF
+ #Under 5.8.x and lower, newXS is declared in proto.h as expecting a non-const
+ #file name argument. If the wrong qualifier is used, it causes breakage with
+ #C++ compilers and warnings with recent gcc.
+ my $file_decl = ($] < 5.009) ? "char file[]" : "const char* file";
+
#-Wall: if there is no $Full_func_name there are no xsubs in this .xs
#so `file' is unused
print Q(<<"EOF") if $Full_func_name;
+##if (PERL_REVISION == 5 && PERL_VERSION < 9)
+# char file[] = __FILE__;
+##else
# const char* file = __FILE__;
+##endif
EOF
print Q("#\n");
@@ -1026,12 +1035,12 @@
print "\n /* End of Initialisation Section */\n\n" ;
}
- if ($] >= 5.009) {
- print <<'EOF';
- if (PL_unitcheckav)
- call_list(PL_scopestack_ix, PL_unitcheckav);
-EOF
- }
+ print Q(<<'EOF');
+##ifdef PL_unitcheckav
+# if (PL_unitcheckav)
+# call_list(PL_scopestack_ix, PL_unitcheckav);
+##endif
+EOF
print Q(<<"EOF");
# XSRETURN_YES;
@@ -1160,7 +1169,7 @@
print "\tSTRLEN\tSTRLEN_length_of_$2;\n";
$lengthof{$2} = $name;
# $islengthof{$name} = $1;
- $deferred .= "\n\tXSauto_length_of_$2 = STRLEN_length_of_$2;";
+ $deferred .= "\n\tXSauto_length_of_$2 = STRLEN_length_of_$2;\n";
}
# check for optional initialisation code
Added: branches/upstream/libextutils-parsexs-perl/current/t/bugs/RT48104.xs
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libextutils-parsexs-perl/current/t/bugs/RT48104.xs?rev=44428&op=file
==============================================================================
--- branches/upstream/libextutils-parsexs-perl/current/t/bugs/RT48104.xs (added)
+++ branches/upstream/libextutils-parsexs-perl/current/t/bugs/RT48104.xs Sun Sep 20 18:16:18 2009
@@ -1,0 +1,115 @@
+// ***** BEGIN LICENSE BLOCK *****
+// Version: MPL 1.1/GPL 2.0/LGPL 2.1
+//
+// The contents of this file are subject to the Mozilla Public License Version
+// 1.1 (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+// http://www.mozilla.org/MPL/
+//
+// Software distributed under the License is distributed on an "AS IS" basis,
+// WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+// for the specific language governing rights and limitations under the
+// License.
+//
+// The Original Code is Encode::Detect wrapper
+//
+// The Initial Developer of the Original Code is
+// Proofpoint, Inc.
+// Portions created by the Initial Developer are Copyright (C) 2005
+// the Initial Developer. All Rights Reserved.
+//
+// Contributor(s):
+//
+// Alternatively, the contents of this file may be used under the terms of
+// either the GNU General Public License Version 2 or later (the "GPL"), or
+// the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+// in which case the provisions of the GPL or the LGPL are applicable instead
+// of those above. If you wish to allow use of your version of this file only
+// under the terms of either the GPL or the LGPL, and not to allow others to
+// use your version of this file under the terms of the MPL, indicate your
+// decision by deleting the provisions above and replace them with the notice
+// and other provisions required by the GPL or the LGPL. If you do not delete
+// the provisions above, a recipient may use your version of this file under
+// the terms of any one of the MPL, the GPL or the LGPL.
+//
+// ***** END LICENSE BLOCK *****
+
+extern "C" {
+#define PERL_NO_GET_CONTEXT /* we want efficiency */
+#include "EXTERN.h"
+#include "perl.h"
+
+// work around perlbug #39634
+#if __GNUC__ == 3 && __GNUC_MINOR__ <= 3
+#undef HASATTRIBUTE_UNUSED
+#endif
+
+#include "XSUB.h"
+}
+
+#include "nscore.h"
+#include "nsUniversalDetector.h"
+
+class Detector: public nsUniversalDetector {
+ public:
+ Detector() {};
+ virtual ~Detector() {}
+ const char *getresult() { return mDetectedCharset; }
+ virtual void Reset() { this->nsUniversalDetector::Reset(); }
+ protected:
+ virtual void Report(const char* aCharset) { mDetectedCharset = aCharset; }
+};
+
+
+MODULE = Encode::Detect::Detector PACKAGE = Encode::Detect::Detector
+PROTOTYPES: ENABLE
+
+
+Detector *
+Detector::new()
+
+void
+Detector::DESTROY()
+
+int
+Detector::handle(SV *buf)
+ CODE:
+ STRLEN len;
+ char *ptr = SvPV(buf, len);
+ RETVAL = THIS->HandleData(ptr, len);
+ OUTPUT:
+ RETVAL
+
+void
+Detector::eof()
+ CODE:
+ THIS->DataEnd();
+
+void
+Detector::reset()
+ CODE:
+ THIS->Reset();
+
+const char *
+Detector::getresult()
+ CODE:
+ RETVAL = THIS->getresult();
+ OUTPUT:
+ RETVAL
+
+
+const char *
+detect(buf)
+ SV *buf
+ CODE:
+ STRLEN len;
+ char *ptr = SvPV(buf, len);
+
+ Detector *det = new Detector;
+ det->HandleData(ptr, len);
+ det->DataEnd();
+ RETVAL = det->getresult();
+ delete det;
+ OUTPUT:
+ RETVAL
+
Added: branches/upstream/libextutils-parsexs-perl/current/t/bugs/typemap
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libextutils-parsexs-perl/current/t/bugs/typemap?rev=44428&op=file
==============================================================================
--- branches/upstream/libextutils-parsexs-perl/current/t/bugs/typemap (added)
+++ branches/upstream/libextutils-parsexs-perl/current/t/bugs/typemap Sun Sep 20 18:16:18 2009
@@ -1,0 +1,18 @@
+TYPEMAP
+Detector * O_OBJECT
+
+INPUT
+O_OBJECT
+ if (sv_isobject($arg) && (SvTYPE(SvRV($arg)) == SVt_PVMG)) {
+ $var = ($type)SvIV((SV*)SvRV( $arg ));
+ } else {
+ warn(\"${Package}::$func_name() -- $var is not a blessed SV reference\");
+ XSRETURN_UNDEF;
+ }
+
+OUTPUT
+# The Perl object is blessed into 'CLASS', which should be a
+# char * having the name of the package for the blessing.
+O_OBJECT
+ sv_setref_pv($arg, CLASS, (void*)$var);
+
Added: branches/upstream/libextutils-parsexs-perl/current/t/include/nsUniversalDetector.h
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libextutils-parsexs-perl/current/t/include/nsUniversalDetector.h?rev=44428&op=file
==============================================================================
--- branches/upstream/libextutils-parsexs-perl/current/t/include/nsUniversalDetector.h (added)
+++ branches/upstream/libextutils-parsexs-perl/current/t/include/nsUniversalDetector.h Sun Sep 20 18:16:18 2009
@@ -1,0 +1,75 @@
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Mozilla Communicator client code.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by the Initial Developer are Copyright (C) 1998
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+#ifndef nsUniversalDetector_h__
+#define nsUniversalDetector_h__
+
+class nsCharSetProber;
+
+#define NUM_OF_CHARSET_PROBERS 3
+
+typedef enum {
+ ePureAscii = 0,
+ eEscAscii = 1,
+ eHighbyte = 2
+} nsInputState;
+
+class nsUniversalDetector {
+public:
+ nsUniversalDetector();
+ virtual ~nsUniversalDetector();
+ virtual nsresult HandleData(const char* aBuf, PRUint32 aLen);
+ virtual void DataEnd(void);
+
+protected:
+ virtual void Report(const char* aCharset) = 0;
+ virtual void Reset();
+ nsInputState mInputState;
+ PRBool mDone;
+ PRBool mInTag;
+ PRBool mStart;
+ PRBool mGotData;
+ char mLastChar;
+ const char * mDetectedCharset;
+ PRInt32 mBestGuess;
+
+ nsCharSetProber *mCharSetProbers[NUM_OF_CHARSET_PROBERS];
+ nsCharSetProber *mEscCharSetProber;
+};
+
+#endif
+
Added: branches/upstream/libextutils-parsexs-perl/current/t/include/nscore.h
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libextutils-parsexs-perl/current/t/include/nscore.h?rev=44428&op=file
==============================================================================
--- branches/upstream/libextutils-parsexs-perl/current/t/include/nscore.h (added)
+++ branches/upstream/libextutils-parsexs-perl/current/t/include/nscore.h Sun Sep 20 18:16:18 2009
@@ -1,0 +1,20 @@
+#ifndef INCLUDED_NSCORE_H
+#define INCLUDED_NSCORE_H
+
+typedef short PRInt16;
+typedef unsigned short PRUint16;
+
+typedef int PRInt32;
+typedef unsigned PRUint32;
+
+typedef int PRBool;
+#define PR_TRUE 1
+#define PR_FALSE 0
+
+#define nsnull 0
+
+typedef PRUint32 nsresult;
+#define NS_OK 0
+#define NS_ERROR_OUT_OF_MEMORY ((nsresult)(0x8007000eL))
+
+#endif /* INCLUDED_NSCORE_H */
More information about the Pkg-perl-cvs-commits
mailing list