|
195 | 195 | : NULLOK means the called function definitely can handle this parameter |
196 | 196 | : being NULL. The reason you need to specify this at all is to tell |
197 | 197 | : future maintainers that you have considered the question about the |
198 | | -: parameter, and this is the answer. |
| 198 | +: parameter, and you have determined that this is the answer. |
199 | 199 | : SPTR means that not only must this pointer parameter be non-NULL, it |
200 | 200 | : points to a position in a character string, which the called |
201 | 201 | : function is not to look behind. If a parameter is marked with this |
|
226 | 226 | : In each equation all three or any two of the constraints must be present. |
227 | 227 | : |
228 | 228 | : When only two constraints are present and one of them is either EPTR or |
229 | | -: EPTRQ, the difference between the remaining SPTR or MPTR becomes somewhat |
230 | | -: fuzzy; the generated assertion will be the same whichever constraint is |
231 | | -: used. You should choose the one that makes the most sense for the |
232 | | -: semantics of the parameter. For example, there are currently some |
233 | | -: functions with parameters named 'curpos', and no SPTR parameter exists. |
234 | | -: The name of the parameter clearly indicates it isn't necessarily the |
235 | | -: starting position of the string, so using MPTR as the constraint makes the |
236 | | -: most sense. |
| 229 | +: EPTRQ, the difference between your choosing to use SPTR or MPTR for the |
| 230 | +: other one becomes somewhat fuzzy; the generated assertion will be the same |
| 231 | +: whichever constraint is used. You should choose the one that makes the |
| 232 | +: most sense for the semantics of the parameter. For example, there are |
| 233 | +: currently some functions with parameters named 'curpos', and no SPTR |
| 234 | +: parameter exists. The name of the parameter clearly indicates it isn't |
| 235 | +: necessarily the starting position of the string, so using MPTR as the |
| 236 | +: constraint makes the most sense. |
237 | 237 | : |
238 | 238 | : The parameters for the function can be in any order, except if a function |
239 | 239 | : has multiple different character strings, all the parameters for the first |
|
0 commit comments