From a7393449eba9fc5173934096651b2fa232ae6764 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Mon, 20 Sep 2010 20:02:21 -0700 Subject: pidl: Fix segfault when accessing unicode objects. --- lib/talloc/pytalloc.c | 9 --------- lib/talloc/pytalloc.h | 2 -- 2 files changed, 11 deletions(-) (limited to 'lib/talloc') diff --git a/lib/talloc/pytalloc.c b/lib/talloc/pytalloc.c index c9c6027fe0..054704f42d 100644 --- a/lib/talloc/pytalloc.c +++ b/lib/talloc/pytalloc.c @@ -119,12 +119,3 @@ PyObject *PyString_FromString_check_null(const char *ptr) } return PyString_FromString(ptr); } - -PyObject *PyUnicode_Decode_check_null(const void *ptr, size_t len, - const char *charset, const char *options) -{ - if (ptr == NULL) { - Py_RETURN_NONE; - } - return PyUnicode_Decode(ptr, len, charset, options); -} diff --git a/lib/talloc/pytalloc.h b/lib/talloc/pytalloc.h index caa388ac50..4782756352 100644 --- a/lib/talloc/pytalloc.h +++ b/lib/talloc/pytalloc.h @@ -55,7 +55,5 @@ PyObject *py_talloc_default_repr(PyObject *py_obj); PyObject *PyCObject_FromTallocPtr(void *); PyObject *PyString_FromString_check_null(const char *ptr); -PyObject *PyUnicode_Decode_check_null(const void *ptr, size_t len, - const char *charset, const char *options); #endif /* _PY_TALLOC_H_ */ -- cgit