ports/123313: Patch that fixes ruby-pcap module fixnums warnings
David Duchscher
daved at tamu.edu
Thu May 1 21:30:02 UTC 2008
>Number: 123313
>Category: ports
>Synopsis: Patch that fixes ruby-pcap module fixnums warnings
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Thu May 01 21:30:00 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator: David Duchscher
>Release: FreeBSD 7.0-RELEASE-p1 i386
>Organization:
Texas A&M University
>Environment:
System: FreeBSD evan-mosh-nat-1.net.tamu.edu 7.0-RELEASE-p1 FreeBSD 7.0-RELEASE-p1 #1: Mon Apr 28 13:51:15 CDT 2008 root at evan-mosh-nat-1.net.tamu.edu:/usr/obj/usr/src/sys/GENERIC i386
>Description:
Module issues the following warnings everytime it is loaded:
/usr/local/lib/ruby/site_ruby/1.8/i386-freebsd7/pcap.so: warning: do not use Fixnums as Symbols
/usr/local/lib/ruby/site_ruby/1.8/i386-freebsd7/pcap.so: warning: do not use Fixnums as Symbols
/usr/local/lib/ruby/site_ruby/1.8/i386-freebsd7/pcap.so: warning: do not use Fixnums as Symbols
>How-To-Repeat:
Load module in ruby script.
require 'pcaplet'
>Fix:
--- patch-Pcap.c begins here ---
--- Pcap.c.orig 2008-05-01 15:26:25.000000000 -0500
+++ Pcap.c 2008-05-01 15:27:21.000000000 -0500
@@ -782,9 +782,9 @@
/* define class PcapStat */
cPcapStat = rb_funcall(rb_cStruct, rb_intern("new"), 4,
Qnil,
- INT2NUM(rb_intern("recv")),
- INT2NUM(rb_intern("drop")),
- INT2NUM(rb_intern("ifdrop")));
+ ID2SYM(rb_intern("recv")),
+ ID2SYM(rb_intern("drop")),
+ ID2SYM(rb_intern("ifdrop")));
rb_define_const(mPcap, "Stat", cPcapStat);
/* define exception classes */
--- patch-Pcap.c ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list