1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-21 00:25:50 +00:00

- Fix STR2CSTR usage [1]

- While here, stage.

PR:		ports/188079 [1]
Submitted by:	Christoph Moench-Tegeder <cmt@burggraben.net> [1]
This commit is contained in:
Steve Wills 2014-03-31 03:26:38 +00:00
parent 1d667843ea
commit 521524a0ce
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=349699
4 changed files with 102 additions and 43 deletions

View File

@ -14,5 +14,4 @@ PLIST= ${.CURDIR}/pkg-plist
DESCR= ${.CURDIR}/pkg-descr
PATCHDIR= ${.CURDIR}/files
NO_STAGE= yes
.include "${MASTERDIR}/Makefile"

View File

@ -1,40 +1,58 @@
--- curia/mod_curia.c.orig 2011-07-24 16:00:48.000000000 +0000
+++ curia/mod_curia.c 2011-07-24 16:02:05.000000000 +0000
@@ -277,9 +277,9 @@
--- curia/mod_curia.c.orig 2014-03-29 18:35:17.000000000 +0100
+++ curia/mod_curia.c 2014-03-29 18:37:22.000000000 +0100
@@ -233,7 +233,7 @@
const char *name;
int index, omode, bnum, dnum;
if((index = getnewindex()) == -1) myerror(DP_EMISC);
- name = STR2CSTR(vname);
+ name = StringValuePtr(vname);
FIXNUM_P(vomode);
omode = FIX2INT(vomode);
FIXNUM_P(vbnum);
@@ -276,10 +276,10 @@
int index, ksiz, vsiz, dmode;
FIXNUM_P(vindex);
if((index = FIX2INT(vindex)) == -1) myerror(DP_EMISC);
kbuf = STR2CSTR(vkey);
- kbuf = STR2CSTR(vkey);
- ksiz = RSTRING(vkey)->len;
+ ksiz = RSTRING_LEN(vkey);
vbuf = STR2CSTR(vval);
- vbuf = STR2CSTR(vval);
- vsiz = RSTRING(vval)->len;
+ kbuf = StringValuePtr(vkey);
+ ksiz = RSTRING_LEN(vkey);
+ vbuf = StringValuePtr(vval);
+ vsiz = RSTRING_LEN(vval);
FIXNUM_P(vdmode);
dmode = FIX2INT(vdmode);
curia = crtable[index];
@@ -298,7 +298,7 @@
@@ -297,8 +297,8 @@
int index, ksiz;
FIXNUM_P(vindex);
if((index = FIX2INT(vindex)) == -1) myerror(DP_EMISC);
kbuf = STR2CSTR(vkey);
- kbuf = STR2CSTR(vkey);
- ksiz = RSTRING(vkey)->len;
+ kbuf = StringValuePtr(vkey);
+ ksiz = RSTRING_LEN(vkey);
curia = crtable[index];
if(!crout(curia, kbuf, ksiz)){
if(crsltable[index] && dpecode == DP_ENOITEM) return Qfalse;
@@ -317,7 +317,7 @@
@@ -316,8 +316,8 @@
VALUE vval;
FIXNUM_P(vindex);
if((index = FIX2INT(vindex)) == -1) myerror(DP_EMISC);
kbuf = STR2CSTR(vkey);
- kbuf = STR2CSTR(vkey);
- ksiz = RSTRING(vkey)->len;
+ kbuf = StringValuePtr(vkey);
+ ksiz = RSTRING_LEN(vkey);
FIXNUM_P(vstart);
start = FIX2INT(vstart);
FIXNUM_P(vmax);
@@ -340,7 +340,7 @@
@@ -339,8 +339,8 @@
int index, ksiz, vsiz;
FIXNUM_P(vindex);
if((index = FIX2INT(vindex)) == -1) myerror(DP_EMISC);
kbuf = STR2CSTR(vkey);
- kbuf = STR2CSTR(vkey);
- ksiz = RSTRING(vkey)->len;
+ kbuf = StringValuePtr(vkey);
+ ksiz = RSTRING_LEN(vkey);
curia = crtable[index];
if((vsiz = crvsiz(curia, kbuf, ksiz)) == -1){

View File

@ -1,40 +1,58 @@
--- depot/mod_depot.c.orig 2011-07-24 15:46:48.000000000 +0000
+++ depot/mod_depot.c 2011-07-24 15:48:24.000000000 +0000
@@ -274,9 +274,9 @@
--- depot/mod_depot.c.orig 2014-03-29 18:35:17.000000000 +0100
+++ depot/mod_depot.c 2014-03-29 18:37:30.000000000 +0100
@@ -232,7 +232,7 @@
const char *name;
int index, omode, bnum;
if((index = getnewindex()) == -1) myerror(DP_EMISC);
- name = STR2CSTR(vname);
+ name = StringValuePtr(vname);
FIXNUM_P(vomode);
omode = FIX2INT(vomode);
FIXNUM_P(vbnum);
@@ -273,10 +273,10 @@
int index, ksiz, vsiz, dmode;
FIXNUM_P(vindex);
if((index = FIX2INT(vindex)) == -1) myerror(DP_EMISC);
kbuf = STR2CSTR(vkey);
- kbuf = STR2CSTR(vkey);
- ksiz = RSTRING(vkey)->len;
+ ksiz = RSTRING_LEN(vkey);
vbuf = STR2CSTR(vval);
- vbuf = STR2CSTR(vval);
- vsiz = RSTRING(vval)->len;
+ kbuf = StringValuePtr(vkey);
+ ksiz = RSTRING_LEN(vkey);
+ vbuf = StringValuePtr(vval);
+ vsiz = RSTRING_LEN(vval);
FIXNUM_P(vdmode);
dmode = FIX2INT(vdmode);
depot = dptable[index];
@@ -295,7 +295,7 @@
@@ -294,8 +294,8 @@
int index, ksiz;
FIXNUM_P(vindex);
if((index = FIX2INT(vindex)) == -1) myerror(DP_EMISC);
kbuf = STR2CSTR(vkey);
- kbuf = STR2CSTR(vkey);
- ksiz = RSTRING(vkey)->len;
+ kbuf = StringValuePtr(vkey);
+ ksiz = RSTRING_LEN(vkey);
depot = dptable[index];
if(!dpout(depot, kbuf, ksiz)){
if(dpsltable[index] && dpecode == DP_ENOITEM) return Qfalse;
@@ -314,7 +314,7 @@
@@ -313,8 +313,8 @@
VALUE vval;
FIXNUM_P(vindex);
if((index = FIX2INT(vindex)) == -1) myerror(DP_EMISC);
kbuf = STR2CSTR(vkey);
- kbuf = STR2CSTR(vkey);
- ksiz = RSTRING(vkey)->len;
+ kbuf = StringValuePtr(vkey);
+ ksiz = RSTRING_LEN(vkey);
FIXNUM_P(vstart);
start = FIX2INT(vstart);
FIXNUM_P(vmax);
@@ -337,7 +337,7 @@
@@ -336,8 +336,8 @@
int index, ksiz, vsiz;
FIXNUM_P(vindex);
if((index = FIX2INT(vindex)) == -1) myerror(DP_EMISC);
kbuf = STR2CSTR(vkey);
- kbuf = STR2CSTR(vkey);
- ksiz = RSTRING(vkey)->len;
+ kbuf = StringValuePtr(vkey);
+ ksiz = RSTRING_LEN(vkey);
depot = dptable[index];
if((vsiz = dpvsiz(depot, kbuf, ksiz)) == -1){

View File

@ -1,67 +1,91 @@
--- villa/mod_villa.c.orig 2011-07-24 16:03:33.000000000 +0000
+++ villa/mod_villa.c 2011-07-24 16:05:49.000000000 +0000
@@ -353,9 +353,9 @@
--- villa/mod_villa.c.orig 2014-03-29 18:35:17.000000000 +0100
+++ villa/mod_villa.c 2014-03-29 18:37:37.000000000 +0100
@@ -304,7 +304,7 @@
int index, omode, cmode;
VLCFUNC cmp;
if((index = getnewindex()) == -1) myerror(DP_EMISC);
- name = STR2CSTR(vname);
+ name = StringValuePtr(vname);
FIXNUM_P(vomode);
omode = FIX2INT(vomode);
FIXNUM_P(vcmode);
@@ -352,10 +352,10 @@
int index, ksiz, vsiz, dmode;
FIXNUM_P(vindex);
if((index = FIX2INT(vindex)) == -1) myerror(DP_EMISC);
kbuf = STR2CSTR(vkey);
- kbuf = STR2CSTR(vkey);
- ksiz = RSTRING(vkey)->len;
+ ksiz = RSTRING_LEN(vkey);
vbuf = STR2CSTR(vval);
- vbuf = STR2CSTR(vval);
- vsiz = RSTRING(vval)->len;
+ kbuf = StringValuePtr(vkey);
+ ksiz = RSTRING_LEN(vkey);
+ vbuf = StringValuePtr(vval);
+ vsiz = RSTRING_LEN(vval);
FIXNUM_P(vdmode);
dmode = FIX2INT(vdmode);
villa = vltable[index];
@@ -374,7 +374,7 @@
@@ -373,8 +373,8 @@
int index, ksiz;
FIXNUM_P(vindex);
if((index = FIX2INT(vindex)) == -1) myerror(DP_EMISC);
kbuf = STR2CSTR(vkey);
- kbuf = STR2CSTR(vkey);
- ksiz = RSTRING(vkey)->len;
+ kbuf = StringValuePtr(vkey);
+ ksiz = RSTRING_LEN(vkey);
villa = vltable[index];
if(!vlout(villa, kbuf, ksiz)){
if(vlsltable[index] && dpecode == DP_ENOITEM) return Qfalse;
@@ -392,7 +392,7 @@
@@ -391,8 +391,8 @@
VALUE vval;
FIXNUM_P(vindex);
if((index = FIX2INT(vindex)) == -1) myerror(DP_EMISC);
kbuf = STR2CSTR(vkey);
- kbuf = STR2CSTR(vkey);
- ksiz = RSTRING(vkey)->len;
+ kbuf = StringValuePtr(vkey);
+ ksiz = RSTRING_LEN(vkey);
villa = vltable[index];
if(!(vbuf = vlget(villa, kbuf, ksiz, &vsiz))){
if(vlsltable[index] && dpecode == DP_ENOITEM) return Qnil;
@@ -410,7 +410,7 @@
@@ -409,8 +409,8 @@
int index, ksiz, vsiz;
FIXNUM_P(vindex);
if((index = FIX2INT(vindex)) == -1) myerror(DP_EMISC);
kbuf = STR2CSTR(vkey);
- kbuf = STR2CSTR(vkey);
- ksiz = RSTRING(vkey)->len;
+ kbuf = StringValuePtr(vkey);
+ ksiz = RSTRING_LEN(vkey);
villa = vltable[index];
if((vsiz = vlvsiz(villa, kbuf, ksiz)) == -1){
if(vlsltable[index] && dpecode == DP_ENOITEM) return INT2FIX(-1);
@@ -427,7 +427,7 @@
@@ -426,8 +426,8 @@
int index, ksiz, vnum;
FIXNUM_P(vindex);
if((index = FIX2INT(vindex)) == -1) myerror(DP_EMISC);
kbuf = STR2CSTR(vkey);
- kbuf = STR2CSTR(vkey);
- ksiz = RSTRING(vkey)->len;
+ kbuf = StringValuePtr(vkey);
+ ksiz = RSTRING_LEN(vkey);
villa = vltable[index];
vnum = vlvnum(villa, kbuf, ksiz);
return INT2FIX(vnum);
@@ -498,7 +498,7 @@
@@ -497,8 +497,8 @@
VALUE vval;
FIXNUM_P(vindex);
if((index = FIX2INT(vindex)) == -1) myerror(DP_EMISC);
kbuf = STR2CSTR(vkey);
- kbuf = STR2CSTR(vkey);
- ksiz = RSTRING(vkey)->len;
+ kbuf = StringValuePtr(vkey);
+ ksiz = RSTRING_LEN(vkey);
FIXNUM_P(vjmode);
jmode = FIX2INT(vjmode);
villa = vltable[index];
@@ -552,7 +552,7 @@
@@ -551,8 +551,8 @@
int index, vsiz, cpmode;
FIXNUM_P(vindex);
if((index = FIX2INT(vindex)) == -1) myerror(DP_EMISC);
vbuf = STR2CSTR(vval);
- vbuf = STR2CSTR(vval);
- vsiz = RSTRING(vval)->len;
+ vbuf = StringValuePtr(vval);
+ vsiz = RSTRING_LEN(vval);
FIXNUM_P(vcpmode);
cpmode = FIX2INT(vcpmode);