Commit 84c019f
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 516181c commit 84c019f
1 file changed
+11
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
335 | 335 | | |
336 | 336 | | |
337 | 337 | | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
338 | 341 | | |
339 | 342 | | |
340 | 343 | | |
| |||
343 | 346 | | |
344 | 347 | | |
345 | 348 | | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
346 | 357 | | |
347 | 358 | | |
348 | 359 | | |
| |||
0 commit comments