r4138 - in trunk/varnish-tools/perl/Varnish-API: . t
sky at projects.linpro.no
sky at projects.linpro.no
Wed Jul 15 00:04:10 CEST 2009
Author: sky
Date: 2009-07-15 00:04:10 +0200 (Wed, 15 Jul 2009)
New Revision: 4138
Added:
trunk/varnish-tools/perl/Varnish-API/t/api.t
Modified:
trunk/varnish-tools/perl/Varnish-API/API.xs
Log:
Add NonBlocking and test VSL_Name
Modified: trunk/varnish-tools/perl/Varnish-API/API.xs
===================================================================
--- trunk/varnish-tools/perl/Varnish-API/API.xs 2009-07-14 21:19:08 UTC (rev 4137)
+++ trunk/varnish-tools/perl/Varnish-API/API.xs 2009-07-14 22:04:10 UTC (rev 4138)
@@ -116,8 +116,11 @@
void
VSL_NonBlocking(vd, nb)
- struct VSL_data * vd
+ SV* vd
int nb
+ CODE:
+ struct VSL_data* data = (struct VSL_data*) SvIV(vd);
+ VSL_NonBlocking(data, nb);
int
VSL_OpenLog(vd, varnish_name)
@@ -126,18 +129,12 @@
CODE:
struct VSL_data* data = (struct VSL_data*) SvIV(vd);
VSL_OpenLog(data, varnish_name);
-
+
struct varnish_stats *
VSL_OpenStats(varnish_name)
const char * varnish_name
-void
-VSL_Select(vd, tag)
- struct VSL_data * vd
- unsigned tag
-
-
int
varnish_instance(n_arg, name, namelen, dir, dirlen)
const char * n_arg
Added: trunk/varnish-tools/perl/Varnish-API/t/api.t
===================================================================
--- trunk/varnish-tools/perl/Varnish-API/t/api.t (rev 0)
+++ trunk/varnish-tools/perl/Varnish-API/t/api.t 2009-07-14 22:04:10 UTC (rev 4138)
@@ -0,0 +1,23 @@
+
+
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+
+
+use Test::More tests => 4;
+BEGIN { use_ok('Varnish::API') };
+use Devel::Peek;
+
+use Sys::Hostname qw(hostname);
+
+my $vd = Varnish::API::VSL_New();
+Varnish::API::VSL_OpenLog($vd, hostname);
+
+Varnish::API::VSL_NonBlocking($vd, 1);
+ok(1);
+Varnish::API::VSL_NonBlocking($vd, 2);
+ok(1);
+ok(1, Varnish::API::VSL_Name);
+
More information about the varnish-commit
mailing list