ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Net-SNMP-XS/XS.xs
(Generate patch)

Comparing Net-SNMP-XS/XS.xs (file contents):
Revision 1.1 by root, Wed Apr 8 10:30:46 2009 UTC vs.
Revision 1.2 by root, Wed Apr 8 10:39:32 2009 UTC

23 23
24#define ASN_LONG_LEN 0x80 24#define ASN_LONG_LEN 0x80
25#define ASN_EXTENSION_ID 0x1f 25#define ASN_EXTENSION_ID 0x1f
26#define ASN_BIT8 0x80 26#define ASN_BIT8 0x80
27 27
28#define BENCHMARK 28//#define BENCHMARK
29 29
30static SV *msg; 30static SV *msg;
31static int errflag; 31static int errflag;
32static U8 *buf, *cur; 32static U8 *buf, *cur;
33static STRLEN len, rem; 33static STRLEN len, rem;
144 errflag = 0; 144 errflag = 0;
145 msg = SvREFCNT_inc (msg_); 145 msg = SvREFCNT_inc (msg_);
146 buf = SvPVbyte (buf_, len); 146 buf = SvPVbyte (buf_, len);
147 cur = buf; 147 cur = buf;
148 rem = len; 148 rem = len;
149 #ifdef BENCHMARK 149#ifdef BENCHMARK
150 t1 = tstamp (); 150 t1 = tstamp ();
151 #endif 151#endif
152 152
153void 153void
154clr_msg () 154clr_msg ()
155 CODE: 155 CODE:
156 SvREFCNT_dec (msg); 156 SvREFCNT_dec (msg);
157 buf = cur = ""; 157 buf = cur = "";
158 len = rem = 0; 158 len = rem = 0;
159 #ifdef BENCHMARK 159#ifdef BENCHMARK
160 printf ("%f\n", tstamp () - t1);//D 160 printf ("%f\n", tstamp () - t1);//D
161 #endif 161#endif
162 162
163MODULE = Net::SNMP::XS PACKAGE = Net::SNMP::Message 163MODULE = Net::SNMP::XS PACKAGE = Net::SNMP::Message
164 164
165void 165void
166_buffer_get (SV *self, int count = -1) 166_buffer_get (SV *self, int count = -1)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines