Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Version 0.02

git-svn-id: http://svn.coderepos.org/share/lang/perl/URI-Escape-XS/trunk@12879 d0d07461-0603-4401-acd4-de1884942a52
  • Loading branch information...
commit d80d63592a6c915546c3b890e0ffb4b607ba6716 1 parent 8a0fae2
dankogai authored
View
8 Changes
@@ -1,9 +1,13 @@
#
-# $Id$
+# $Id: Changes,v 0.2 2008/05/30 23:53:13 dankogai Exp dankogai $
#
# Revision history for Revision history for URI-Escape-XS
#
-$Revision: 0.1 $ $Date: 2007/04/27 17:17:46 $
+$Revision: 0.2 $ $Date: 2008/05/30 23:53:13 $
+! XS.xs
+ s/ishexnumber/isxdigit/g # for better compatibility
+ http://rt.cpan.org/Public/Bug/Display.html?id=32556
+ http://rt.cpan.org/Public/Bug/Display.html?id=28583
! lib/URI/Escape/XS.pm
POD fixes.
View
23 META.yml
@@ -1,14 +1,11 @@
---- #YAML:1.0
-name: URI-Escape-XS
-version: 0.01
-abstract: Drop-In replacement for URI::Escape
-license: ~
-author:
- - Dan Kogai <dankogai@dan.co.jp>
-generated_by: ExtUtils::MakeMaker version 6.42
-distribution_type: module
-requires:
+# http://module-build.sourceforge.net/META-spec.html
+#XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX#
+name: URI-Escape-XS
+version: 0.01
+version_from: lib/URI/Escape/XS.pm
+installdirs: site
+requires:
Test::More: 0
-meta-spec:
- url: http://module-build.sourceforge.net/META-spec-v1.3.html
- version: 1.3
+
+distribution_type: module
+generated_by: ExtUtils::MakeMaker version 6.30
View
2  README
@@ -2,7 +2,7 @@ NAME
URI::Escape::XS - Drop-In replacement for URI::Escape
VERSION
- $Id: XS.pm,v 0.1 2007/04/27 17:17:46 dankogai Exp dankogai $
+ $Id: README,v 0.2 2008/05/30 23:53:13 dankogai Exp dankogai $
SYNOPSIS
# use it instead of URI::Escape
View
12 XS.xs
@@ -1,5 +1,5 @@
/*
- * $Id: XS.xs,v 0.1 2007/04/27 17:17:46 dankogai Exp dankogai $
+ * $Id: XS.xs,v 0.2 2008/05/30 23:53:13 dankogai Exp dankogai $
*/
#include "EXTERN.h"
@@ -73,15 +73,15 @@ SV *decode_uri_component(SV *uri){
for (i = 0; i < slen; i++){
if (src[i] == '%'){
- if (ishexnumber(src[i+1]) && ishexnumber(src[i+2])){
+ if (isxdigit(src[i+1]) && isxdigit(src[i+2])){
strncpy((char *)buf, (char *)(src + i + 1), 2);
hi = strtol((char *)buf, NULL, 16);
dst[dlen++] = hi;
i += 2;
}
else if(src[i+1] == 'u'
- && ishexnumber(src[i+2]) && ishexnumber(src[i+3])
- && ishexnumber(src[i+4]) && ishexnumber(src[i+5])){
+ && isxdigit(src[i+2]) && isxdigit(src[i+3])
+ && isxdigit(src[i+4]) && isxdigit(src[i+5])){
strncpy((char *)buf, (char *)(src + i + 2), 4);
hi = strtol((char *)buf, NULL, 16);
i += 5;
@@ -95,8 +95,8 @@ SV *decode_uri_component(SV *uri){
}else{
i++;
if(src[i] == '%' && src[i+1] == 'u'
- && ishexnumber(src[i+2]) && ishexnumber(src[i+3])
- && ishexnumber(src[i+4]) && ishexnumber(src[i+5])){
+ && isxdigit(src[i+2]) && isxdigit(src[i+3])
+ && isxdigit(src[i+4]) && isxdigit(src[i+5])){
strncpy((char *)buf, (char *)(src + i + 2), 4);
lo = strtol((char *)buf, NULL, 16);
i += 5;
View
8 lib/URI/Escape/XS.pm
@@ -1,6 +1,6 @@
package URI::Escape::XS;
#
-# $Id: XS.pm,v 0.1 2007/04/27 17:17:46 dankogai Exp dankogai $
+# $Id: XS.pm,v 0.2 2008/05/30 23:53:13 dankogai Exp dankogai $
#
use 5.008001;
use warnings;
@@ -56,7 +56,7 @@ URI::Escape::XS - Drop-In replacement for URI::Escape
=head1 VERSION
-$Id: XS.pm,v 0.1 2007/04/27 17:17:46 dankogai Exp dankogai $
+$Id: XS.pm,v 0.2 2008/05/30 23:53:13 dankogai Exp dankogai $
=cut
@@ -87,7 +87,7 @@ L</uri_escape> and L</uri_unescape>
=head2 encodeURIComponent
-Does what JavaScript's encodeURIComponent does.
+Does what JavaScript's encodeURIComponent does.
$uri = encodeURIComponent("http://www.example.com/");
# http%3A%2F%2Fwww.example.com%2F
@@ -247,7 +247,7 @@ Koichi Taniguchi for L<URI::Escape::JavaScript>
=head1 COPYRIGHT & LICENSE
-Copyright 2007 Dan Kogai, all rights reserved.
+Copyright 2007-2008 Dan Kogai, all rights reserved.
This program is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.
View
2  t/01-compat.t
@@ -1,6 +1,6 @@
#!perl -w
#
-# $Id: 01-compat.t,v 0.1 2007/04/27 17:17:46 dankogai Exp dankogai $
+# $Id: 01-compat.t,v 0.1 2007/04/27 17:17:46 dankogai Exp $
#
# Original as URI-1.35/t/escape.t
#
View
2  t/02-basic.t
@@ -1,6 +1,6 @@
#!perl -w
#
-# $Id: 02-basic.t,v 0.1 2007/04/27 17:17:46 dankogai Exp dankogai $
+# $Id: 02-basic.t,v 0.1 2007/04/27 17:17:46 dankogai Exp $
#
# Original as URI-1.35/t/escape.t
#
View
2  t/03-hashu.t
@@ -1,6 +1,6 @@
#!perl -w
#
-# $Id: 03-hashu.t,v 0.1 2007/04/27 17:17:46 dankogai Exp dankogai $
+# $Id: 03-hashu.t,v 0.1 2007/04/27 17:17:46 dankogai Exp $
#
# Original as URI-1.35/t/escape.t
#
Please sign in to comment.
Something went wrong with that request. Please try again.