- required for PVAR fixups in K modules
... | ... |
@@ -100,7 +100,7 @@ int fixup_regexpNL_none(void** param, int param_no); /* textops */ |
100 | 100 |
int ret; \ |
101 | 101 |
if ((ret=fixup_fp_##suffix (param, param_no))!=0) \ |
102 | 102 |
return ret; \ |
103 |
- *param=&((fparam_t*)*param)->v; \ |
|
103 |
+ *param=((fparam_t*)*param)->fixed; \ |
|
104 | 104 |
return 0; \ |
105 | 105 |
} \ |
106 | 106 |
int fixup_free_##suffix (void** param, int param_no) \ |
... | ... |
@@ -1142,6 +1142,7 @@ int fix_param(int type, void** param) |
1142 | 1142 |
p->v.pvs=0; |
1143 | 1143 |
goto error; |
1144 | 1144 |
} |
1145 |
+ p->fixed = p->v.pvs; |
|
1145 | 1146 |
break; |
1146 | 1147 |
case FPARAM_PVE: |
1147 | 1148 |
name.s = (char*)*param; |
... | ... |
@@ -1154,6 +1155,8 @@ int fix_param(int type, void** param) |
1154 | 1155 |
} |
1155 | 1156 |
|
1156 | 1157 |
p->type = type; |
1158 |
+ if(p->fixed==NULL) |
|
1159 |
+ p->fixed = &p->v; |
|
1157 | 1160 |
*param = (void*)p; |
1158 | 1161 |
return 0; |
1159 | 1162 |
|
... | ... |
@@ -252,9 +252,9 @@ enum { |
252 | 252 |
* Function parameter |
253 | 253 |
*/ |
254 | 254 |
typedef struct fparam { |
255 |
- char* orig; /* The original value */ |
|
256 |
- int type; /* Type of parameter */ |
|
257 |
- union { |
|
255 |
+ char* orig; /* The original value */ |
|
256 |
+ int type; /* Type of parameter */ |
|
257 |
+ union { |
|
258 | 258 |
char* asciiz; /* Zero terminated ASCII string */ |
259 | 259 |
struct _str str; /* pointer/len string */ |
260 | 260 |
int i; /* Integer value */ |
... | ... |
@@ -265,6 +265,7 @@ typedef struct fparam { |
265 | 265 |
pv_spec_t* pvs; /* kamailo pseudo-vars */ |
266 | 266 |
pv_elem_t* pve; /* kamailo pseudo-vars in a string */ |
267 | 267 |
} v; |
268 |
+ void *fixed; |
|
268 | 269 |
} fparam_t; |
269 | 270 |
|
270 | 271 |
|