Are the thorns of Bougainvillea and tendrils of Cucurbita homologous or analogous?

Are the thorns of Bougainvillea and tendrils of Cucurbita homologous or analogous? What type of evolution has brought such a similarity in them?

The thorns of Bougainvillea and tendrils of Cucurbita are homologous organs. Divergent evolution has brought a similarity in them.