Original: In this version, the lamp's djinni (genie) is female and Aladdin marries her rather than the princess (she becomes a mortal woman for his sake).
Simplified: In the end Aladdin marries her (rather than the princess).