~ubuntu-branches/ubuntu/wily/libxml2/wily-proposed

« back to all changes in this revision

Viewing changes to python/types.c

  • Committer: Package Import Robot
  • Author(s): Aron Xu
  • Date: 2014-10-26 07:04:50 UTC
  • mfrom: (43.2.7 sid)
  • Revision ID: package-import@ubuntu.com-20141026070450-rmcqvcqn8peeuebs
Tags: 2.9.2+dfsg1-1
* New upstream release (Closes: #765722, CVE-2014-3660)
* Remove no-longer-needed upstream patches
* Update distro patch
* Std-ver: 3.9.5 -> 3.9.6, no change.

Show diffs side-by-side

added added

removed removed

Lines of Context:
594
594
}
595
595
 
596
596
xmlXPathObjectPtr
597
 
libxml_xmlXPathObjectPtrConvert(PyObject * obj)
 
597
libxml_xmlXPathObjectPtrConvert(PyObject *obj)
598
598
{
599
599
    xmlXPathObjectPtr ret = NULL;
600
600
 
633
633
#if PY_VERSION_HEX >= 0x03030000
634
634
        xmlChar *str;
635
635
        const char *tmp;
636
 
        size_t size;
 
636
        Py_ssize_t size;
637
637
 
638
638
        /* tmp doesn't need to be deallocated */
639
639
        tmp = PyUnicode_AsUTF8AndSize(obj, &size);
640
 
        str = xmlStrndup(tmp, (int) size);
 
640
        str = xmlStrndup((const xmlChar *) tmp, (int) size);
641
641
        ret = xmlXPathWrapString(str);
642
642
#else
643
643
        xmlChar *str = NULL;