Do a global encoding of a string, replacing the predefined
          entities and non ASCII values with their entities and
          CharRef counterparts. Contrary to xmlEncodeEntities, this
           routine is reentrant, and result must be deallocated.

def encodeEntitiesReentrant(self, input):
        """Do a global encoding of a string, replacing the predefined
          entities and non ASCII values with their entities and
          CharRef counterparts. Contrary to xmlEncodeEntities, this
           routine is reentrant, and result must be deallocated. """
        ret = libxml2mod.xmlEncodeEntitiesReentrant(self._o, input)
        return ret