Commit 278e51f
committed
ly_path_parse OPTIMIZE fail faster on invalid path
`ly_path_parse()` is called from various functions like
`lyplg_type_store_node_instanceid()` and `lyplg_type_lypath_new()` with
the `LY_PATH_BEGIN_ABSOLUTE` flag set.
This means that the path is expected to start with a '/' character.
If it doesn't, this could mean that the value is not a valid path.
This can happen while finding a union type, where it is not optimal to
call `lyxp_expr_parse()`, which is much heavier to compute.1 parent 64c0b0f commit 278e51f
2 files changed
+11
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
328 | 328 | | |
329 | 329 | | |
330 | 330 | | |
| 331 | + | |
| 332 | + | |
331 | 333 | | |
332 | 334 | | |
333 | 335 | | |
| |||
339 | 341 | | |
340 | 342 | | |
341 | 343 | | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
342 | 352 | | |
343 | 353 | | |
344 | 354 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
200 | 200 | | |
201 | 201 | | |
202 | 202 | | |
203 | | - | |
| 203 | + | |
204 | 204 | | |
205 | 205 | | |
206 | 206 | | |
| |||
0 commit comments