Skip to content

Commit

Permalink
Fixed STR2CSTR issue for ruby 1.9.2
Browse files Browse the repository at this point in the history
  • Loading branch information
etamme committed Feb 3, 2011
1 parent 1e87076 commit b217ab8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ext/Pcap.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ pcap_s_lookupnet(self, dev)
struct in_addr addr;

Check_Type(dev, T_STRING);
if (pcap_lookupnet(STR2CSTR(dev), &net, &mask, pcap_errbuf) == -1) {
if (pcap_lookupnet(StringValuePtr(dev), &net, &mask, pcap_errbuf) == -1) {
rb_raise(ePcapError, "%s", pcap_errbuf);
}

Expand Down Expand Up @@ -685,7 +685,7 @@ filter_new(argc, argv, class)
&v_optimize, &v_netmask);
/* filter expression */
Check_Type(v_expr, T_STRING);
expr = STR2CSTR(v_expr);
expr = StringValuePtr(v_expr);
/* capture object */
if (IsKindOf(v_capture, cCapture)) {
CheckClass(v_capture, cCapture);
Expand Down

0 comments on commit b217ab8

Please sign in to comment.