This path function is deprecated because it doesn't work properly if you
are using paths. glib-mkenums is using it "properly" in the sense that
it is not passing it any paths, but on the other hand, passing non-paths
to a path function is pretty silly. You can see why the function is
deprecated.
Embarassingly, my replacement implementation is AI-generated, although I
have simplified it to be less robust than the AI proposed. Why did I
intentionally make the function less robust? Because it's only used in
one place, and doesn't need to be able to handle any possible number of
arguments.