Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-10-22 14:49:35 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-10-22 14:49:35 +0400
commitebe63b664baa2f4e65643a2535766e5babf9c8a7 (patch)
tree7b0303d4f8311bd34483c0c7999c4c29b40f2263 /source/blender/python/generic/py_capi_utils.h
parentcac4fde224f3dfb2831779df7b61f819a3564e2d (diff)
py api - added PyC_UnicodeFromByteAndSize() to match PyUnicode_FromStringAndSize()
also made RNA_property_string_get_alloc() return the length of the new string to avoid having to run strlen on it after.
Diffstat (limited to 'source/blender/python/generic/py_capi_utils.h')
-rw-r--r--source/blender/python/generic/py_capi_utils.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/python/generic/py_capi_utils.h b/source/blender/python/generic/py_capi_utils.h
index f38ce209be2..ccd001aabd4 100644
--- a/source/blender/python/generic/py_capi_utils.h
+++ b/source/blender/python/generic/py_capi_utils.h
@@ -40,8 +40,9 @@ void PyC_FileAndNum_Safe(const char **filename, int *lineno); /* checks python
int PyC_AsArray(void *array, PyObject *value, const int length, const PyTypeObject *type, const short is_double, const char *error_prefix);
/* follow http://www.python.org/dev/peps/pep-0383/ */
-PyObject * PyC_UnicodeFromByte(const char *str);
-const char * PyC_UnicodeAsByte(PyObject *py_str, PyObject **coerce); /* coerce must be NULL */
+PyObject * PyC_UnicodeFromByte(const char *str);
+PyObject * PyC_UnicodeFromByteAndSize(const char *str, Py_ssize_t size);
+const char * PyC_UnicodeAsByte(PyObject *py_str, PyObject **coerce); /* coerce must be NULL */
/* name namespace function for bpy & bge */
PyObject * PyC_DefaultNameSpace(const char *filename);