[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [26996] trunk/blender/source/blender/ python/intern/bpy_props.c: py/ rna api property api functions crashed with empty args.

Campbell Barton ideasman42 at gmail.com
Wed Feb 17 18:22:40 CET 2010


Revision: 26996
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=26996
Author:   campbellbarton
Date:     2010-02-17 18:22:39 +0100 (Wed, 17 Feb 2010)

Log Message:
-----------
py/rna api property api functions crashed with empty args.
 eg: bpy.props.BoolProperty()

Modified Paths:
--------------
    trunk/blender/source/blender/python/intern/bpy_props.c

Modified: trunk/blender/source/blender/python/intern/bpy_props.c
===================================================================
--- trunk/blender/source/blender/python/intern/bpy_props.c	2010-02-17 17:16:04 UTC (rev 26995)
+++ trunk/blender/source/blender/python/intern/bpy_props.c	2010-02-17 17:22:39 UTC (rev 26996)
@@ -103,8 +103,8 @@
 {
 	StructRNA *srna;
 
-	if (PyTuple_GET_SIZE(args) > 0) {
-	 	PyErr_SetString(PyExc_ValueError, "all args must be keywors"); // TODO - py3 can enforce this.
+	if (PyTuple_GET_SIZE(args) > 0 || kw==NULL) {
+	 	PyErr_SetString(PyExc_ValueError, "all args must be keywords");
 		return NULL;
 	}
 
@@ -163,8 +163,8 @@
 {
 	StructRNA *srna;
 
-	if (PyTuple_GET_SIZE(args) > 0) {
-	 	PyErr_SetString(PyExc_ValueError, "all args must be keywors"); // TODO - py3 can enforce this.
+	if (PyTuple_GET_SIZE(args) > 0 || kw==NULL) {
+	 	PyErr_SetString(PyExc_ValueError, "all args must be keywords");
 		return NULL;
 	}
 
@@ -234,8 +234,8 @@
 {
 	StructRNA *srna;
 
-	if (PyTuple_GET_SIZE(args) > 0) {
-	 	PyErr_SetString(PyExc_ValueError, "all args must be keywors"); // TODO - py3 can enforce this.
+	if (PyTuple_GET_SIZE(args) > 0 || kw==NULL) {
+	 	PyErr_SetString(PyExc_ValueError, "all args must be keywords");
 		return NULL;
 	}
 
@@ -295,8 +295,8 @@
 {
 	StructRNA *srna;
 
-	if (PyTuple_GET_SIZE(args) > 0) {
-	 	PyErr_SetString(PyExc_ValueError, "all args must be keywors"); // TODO - py3 can enforce this.
+	if (PyTuple_GET_SIZE(args) > 0 || kw==NULL) {
+	 	PyErr_SetString(PyExc_ValueError, "all args must be keywords");
 		return NULL;
 	}
 
@@ -370,8 +370,8 @@
 {
 	StructRNA *srna;
 
-	if (PyTuple_GET_SIZE(args) > 0) {
-	 	PyErr_SetString(PyExc_ValueError, "all args must be keywors"); // TODO - py3 can enforce this.
+	if (PyTuple_GET_SIZE(args) > 0 || kw==NULL) {
+	 	PyErr_SetString(PyExc_ValueError, "all args must be keywords");
 		return NULL;
 	}
 
@@ -439,8 +439,8 @@
 {
 	StructRNA *srna;
 
-	if (PyTuple_GET_SIZE(args) > 0) {
-	 	PyErr_SetString(PyExc_ValueError, "all args must be keywors"); // TODO - py3 can enforce this.
+	if (PyTuple_GET_SIZE(args) > 0 || kw==NULL) {
+	 	PyErr_SetString(PyExc_ValueError, "all args must be keywords");
 		return NULL;
 	}
 
@@ -511,8 +511,8 @@
 {
 	StructRNA *srna;
 
-	if (PyTuple_GET_SIZE(args) > 0) {
-	 	PyErr_SetString(PyExc_ValueError, "all args must be keywors"); // TODO - py3 can enforce this.
+	if (PyTuple_GET_SIZE(args) > 0 || kw==NULL) {
+	 	PyErr_SetString(PyExc_ValueError, "all args must be keywords");
 		return NULL;
 	}
 
@@ -617,8 +617,8 @@
 {
 	StructRNA *srna;
 
-	if (PyTuple_GET_SIZE(args) > 0) {
-	 	PyErr_SetString(PyExc_ValueError, "all args must be keywors"); // TODO - py3 can enforce this.
+	if (PyTuple_GET_SIZE(args) > 0 || kw==NULL) {
+	 	PyErr_SetString(PyExc_ValueError, "all args must be keywords");
 		return NULL;
 	}
 
@@ -692,8 +692,8 @@
 {
 	StructRNA *srna;
 
-	if (PyTuple_GET_SIZE(args) > 0) {
-	 	PyErr_SetString(PyExc_ValueError, "all args must be keywors"); // TODO - py3 can enforce this.
+	if (PyTuple_GET_SIZE(args) > 0 || kw==NULL) {
+	 	PyErr_SetString(PyExc_ValueError, "all args must be keywords");
 		return NULL;
 	}
 
@@ -747,8 +747,8 @@
 {
 	StructRNA *srna;
 
-	if (PyTuple_GET_SIZE(args) > 0) {
-	 	PyErr_SetString(PyExc_ValueError, "all args must be keywors"); // TODO - py3 can enforce this.
+	if (PyTuple_GET_SIZE(args) > 0 || kw==NULL) {
+	 	PyErr_SetString(PyExc_ValueError, "all args must be keywords");
 		return NULL;
 	}
 





More information about the Bf-blender-cvs mailing list