r60470 - in /branches/upstream/libjavascript-minifier-xs-perl/current: Changes META.yml Makefile.PL XS.xs lib/JavaScript/Minifier/XS.pm
ansgar-guest at users.alioth.debian.org
ansgar-guest at users.alioth.debian.org
Thu Jul 22 11:31:18 UTC 2010
Author: ansgar-guest
Date: Thu Jul 22 11:30:59 2010
New Revision: 60470
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=60470
Log:
[svn-upgrade] new version libjavascript-minifier-xs-perl (0.08)
Modified:
branches/upstream/libjavascript-minifier-xs-perl/current/Changes
branches/upstream/libjavascript-minifier-xs-perl/current/META.yml
branches/upstream/libjavascript-minifier-xs-perl/current/Makefile.PL
branches/upstream/libjavascript-minifier-xs-perl/current/XS.xs
branches/upstream/libjavascript-minifier-xs-perl/current/lib/JavaScript/Minifier/XS.pm
Modified: branches/upstream/libjavascript-minifier-xs-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libjavascript-minifier-xs-perl/current/Changes?rev=60470&op=diff
==============================================================================
--- branches/upstream/libjavascript-minifier-xs-perl/current/Changes (original)
+++ branches/upstream/libjavascript-minifier-xs-perl/current/Changes Thu Jul 22 11:30:59 2010
@@ -1,4 +1,8 @@
Revision history for Perl extension JavaScript::Minifier::XS.
+
+0.08 Wed Jul 21 21:23 PDT 2010
+ - use Newxz/Safefree for memory management, instead of malloc/free. Thanks
+ to Kenichi Ishigaki for his patch to CSS-Minifier-XS that prompted this.
0.07 Fri Apr 23 23:44 PDT 2010
- switch to Git
Modified: branches/upstream/libjavascript-minifier-xs-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libjavascript-minifier-xs-perl/current/META.yml?rev=60470&op=diff
==============================================================================
--- branches/upstream/libjavascript-minifier-xs-perl/current/META.yml (original)
+++ branches/upstream/libjavascript-minifier-xs-perl/current/META.yml Thu Jul 22 11:30:59 2010
@@ -1,21 +1,23 @@
---
name: JavaScript-Minifier-XS
-version: 0.07
+version: 0.08
author:
- Graham TerMarsch (cpan at howlingfrog.com)
abstract: XS based JavaScript minifier
license: perl
resources:
- license: ~
+ license: http://dev.perl.org/licenses/
+build_requires:
+ Test::More: 0
requires:
perl: 5.006
-build_requires:
- Test::More: 0
+configure_requires:
+ Module::Build: 0.35
provides:
JavaScript::Minifier::XS:
file: lib/JavaScript/Minifier/XS.pm
- version: 0.07
-generated_by: Module::Build version 0.32
+ version: 0.08
+generated_by: Module::Build version 0.35
meta-spec:
- url: http://module-build.sourceforge.net/META-spec-v1.2.html
- version: 1.2
+ url: http://module-build.sourceforge.net/META-spec-v1.4.html
+ version: 1.4
Modified: branches/upstream/libjavascript-minifier-xs-perl/current/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libjavascript-minifier-xs-perl/current/Makefile.PL?rev=60470&op=diff
==============================================================================
--- branches/upstream/libjavascript-minifier-xs-perl/current/Makefile.PL (original)
+++ branches/upstream/libjavascript-minifier-xs-perl/current/Makefile.PL Thu Jul 22 11:30:59 2010
@@ -1,14 +1,15 @@
-# Note: this file was auto-generated by Module::Build::Compat version 0.32
+# Note: this file was auto-generated by Module::Build::Compat version 0.35
require 5.006;
use ExtUtils::MakeMaker;
WriteMakefile
(
+ 'PL_FILES' => {},
+ 'INSTALLDIRS' => 'site',
'NAME' => 'JavaScript::Minifier::XS',
+ 'EXE_FILES' => [],
'VERSION_FROM' => 'lib/JavaScript/Minifier/XS.pm',
'PREREQ_PM' => {
'Test::More' => 0
- },
- 'INSTALLDIRS' => 'site',
- 'EXE_FILES' => []
+ }
)
;
Modified: branches/upstream/libjavascript-minifier-xs-perl/current/XS.xs
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libjavascript-minifier-xs-perl/current/XS.xs?rev=60470&op=diff
==============================================================================
--- branches/upstream/libjavascript-minifier-xs-perl/current/XS.xs (original)
+++ branches/upstream/libjavascript-minifier-xs-perl/current/XS.xs Thu Jul 22 11:30:59 2010
@@ -196,7 +196,8 @@
/* allocates a new node */
static size_t js_id_counter=0; // XXX
Node* JsAllocNode() {
- Node* node = malloc(sizeof(Node));
+ Node* node;
+ Newxz(node, 1, Node);
node->prev = NULL;
node->next = NULL;
node->contents = NULL;
@@ -209,8 +210,8 @@
/* frees the memory used by a node */
void JsFreeNode(Node* node) {
if (node->contents)
- free(node->contents);
- free(node);
+ Safefree(node->contents);
+ Safefree(node);
}
void JsFreeNodeList(Node* head) {
while (head) {
@@ -223,7 +224,7 @@
/* clears the contents of a node */
void JsClearNodeContents(Node* node) {
if (node->contents)
- free(node->contents);
+ Safefree(node->contents);
node->contents = NULL;
node->length = 0;
}
@@ -235,8 +236,7 @@
JsClearNodeContents(node);
node->length = len;
/* allocate string, fill with NULLs, and copy */
- node->contents = malloc( sizeof(char) * bufSize );
- memset( node->contents, 0, bufSize );
+ Newxz(node->contents, bufSize, char);
strncpy( node->contents, string, len );
}
@@ -692,7 +692,8 @@
/* allocate the result buffer to the same size as the original JS; in a
* worst case scenario that's how much memory we'll need for it.
*/
- ptr = results = malloc( sizeof(char) * (strlen(string)+1) );
+ Newxz(results, (strlen(string)+1), char);
+ ptr = results;
/* copy node contents into result buffer */
curr = head;
while (curr) {
@@ -726,7 +727,7 @@
/* hand back the minified JS (if we had any) */
if (buffer != NULL) {
RETVAL = newSVpv(buffer, 0);
- free( buffer );
+ Safefree( buffer );
}
OUTPUT:
RETVAL
Modified: branches/upstream/libjavascript-minifier-xs-perl/current/lib/JavaScript/Minifier/XS.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libjavascript-minifier-xs-perl/current/lib/JavaScript/Minifier/XS.pm?rev=60470&op=diff
==============================================================================
--- branches/upstream/libjavascript-minifier-xs-perl/current/lib/JavaScript/Minifier/XS.pm (original)
+++ branches/upstream/libjavascript-minifier-xs-perl/current/lib/JavaScript/Minifier/XS.pm Thu Jul 22 11:30:59 2010
@@ -9,7 +9,7 @@
our @ISA = qw(Exporter DynaLoader);
our @EXPORT_OK = qw(minify);
-our $VERSION = '0.07';
+our $VERSION = '0.08';
bootstrap JavaScript::Minifier::XS $VERSION;
More information about the Pkg-perl-cvs-commits
mailing list