[Bf-blender-cvs] [550fee8eb6f] blender2.8: GPU Python: use _PyArg_ParseTupleAndKeywordsFast.

mano-wii noreply at git.blender.org
Fri Oct 5 19:40:16 CEST 2018


Commit: 550fee8eb6f76028d83192536c454786b6e0e516
Author: mano-wii
Date:   Fri Oct 5 14:06:24 2018 -0300
Branches: blender2.8
https://developer.blender.org/rB550fee8eb6f76028d83192536c454786b6e0e516

GPU Python: use _PyArg_ParseTupleAndKeywordsFast.

===================================================================

M	source/blender/python/gpu/gpu_py_vertex_format.c

===================================================================

diff --git a/source/blender/python/gpu/gpu_py_vertex_format.c b/source/blender/python/gpu/gpu_py_vertex_format.c
index 794167fab7a..0568bc2a9ae 100644
--- a/source/blender/python/gpu/gpu_py_vertex_format.c
+++ b/source/blender/python/gpu/gpu_py_vertex_format.c
@@ -211,11 +211,14 @@ static int insert_attributes_from_list(GPUVertFormat *format, PyObject *list)
 
 static PyObject *bpygpu_VertFormat_new(PyTypeObject *UNUSED(type), PyObject *args, PyObject *kwds)
 {
-
 	PyObject *format_list;
 
-	static const char *keywords[] = {"format", NULL};
-	if (!PyArg_ParseTupleAndKeywords(args, kwds, "O!", (char**)keywords, &PyList_Type, &format_list)) {
+	static const char *_keywords[] = {"format", NULL};
+	static _PyArg_Parser _parser = {"O!:VertFormat.__new__", _keywords, 0};
+	if (!_PyArg_ParseTupleAndKeywordsFast(
+	        args, kwds, &_parser,
+	        &PyList_Type, &format_list))
+	{
 		return NULL;
 	}



More information about the Bf-blender-cvs mailing list