I have found that simply adding the "eModifierTypeFlag_AcceptsCVs" flag to "Displace" modifier enables it for curves.
It works perfectly fine unless you press "Apply on spline" button. Blender crashes.
I'm not a developer, and unfortunately, I don't have a deep understanding of Blender code. So, any advice is welcome on how to catch and fix this exception.
