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
path: root/source
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2010-02-17 20:22:39 +0300
committerCampbell Barton <ideasman42@gmail.com>2010-02-17 20:22:39 +0300
commit3c2d59e032ee8d203f3fa06afe8809d0dfecefd8 (patch)
tree468fa408de9d1c80bba77efe0dfc922a3f63a75b /source
parent780aa24dfea09137175d44d50f50f5c118f13ac2 (diff)
py/rna api property api functions crashed with empty args.
eg: bpy.props.BoolProperty()
Diffstat (limited to 'source')
-rw-r--r--source/blender/python/intern/bpy_props.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/source/blender/python/intern/bpy_props.c b/source/blender/python/intern/bpy_props.c
index 07f7dfc0d09..7355fa2a0c9 100644
--- a/source/blender/python/intern/bpy_props.c
+++ b/source/blender/python/intern/bpy_props.c
@@ -103,8 +103,8 @@ PyObject *BPy_BoolProperty(PyObject *self, PyObject *args, PyObject *kw)
{
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 @@ PyObject *BPy_BoolVectorProperty(PyObject *self, PyObject *args, PyObject *kw)
{
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 @@ PyObject *BPy_IntProperty(PyObject *self, PyObject *args, PyObject *kw)
{
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 @@ PyObject *BPy_IntVectorProperty(PyObject *self, PyObject *args, PyObject *kw)
{
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 @@ PyObject *BPy_FloatProperty(PyObject *self, PyObject *args, PyObject *kw)
{
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 @@ PyObject *BPy_FloatVectorProperty(PyObject *self, PyObject *args, PyObject *kw)
{
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 @@ PyObject *BPy_StringProperty(PyObject *self, PyObject *args, PyObject *kw)
{
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 @@ PyObject *BPy_EnumProperty(PyObject *self, PyObject *args, PyObject *kw)
{
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 @@ PyObject *BPy_PointerProperty(PyObject *self, PyObject *args, PyObject *kw)
{
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 @@ PyObject *BPy_CollectionProperty(PyObject *self, PyObject *args, PyObject *kw)
{
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;
}