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>2009-07-17 06:31:28 +0400
committerCampbell Barton <ideasman42@gmail.com>2009-07-17 06:31:28 +0400
commit70f6255433fcb1f5551199ef7a285a9ab80a3318 (patch)
tree1471a4451ee14d5b29ed37e2dc86300b01180698 /source/blender/makesrna/RNA_types.h
parentc6c853d88a9c5ff12b7a56e4bdaca1757f160997 (diff)
bpy rna
Calling rna functions with invalid keywords, too many keywords and too many args would fail silently - now raise an error with invalid keywords and a list of valid ones, raise an error when too many args are given. - calling rna functions would alloc a ParameterList each time, changed to use a stack variable (2 pointers and an int). - store the number of parameters ParameterList - python exception types were wrong in many cases, (using attribute error rather then type error) - fixes to small errors in python UI scripts.
Diffstat (limited to 'source/blender/makesrna/RNA_types.h')
-rw-r--r--source/blender/makesrna/RNA_types.h15
1 files changed, 12 insertions, 3 deletions
diff --git a/source/blender/makesrna/RNA_types.h b/source/blender/makesrna/RNA_types.h
index dc2a2a1a1de..bf4fa97b6fe 100644
--- a/source/blender/makesrna/RNA_types.h
+++ b/source/blender/makesrna/RNA_types.h
@@ -163,10 +163,19 @@ typedef struct PropertyRNA PropertyRNA;
/* Parameter List */
-typedef struct ParameterList ParameterList;
+typedef struct ParameterList {
+ /* storage for parameters */
+ void *data;
+
+ /* store the parameter count */
+ int tot;
+
+ /* function passed at creation time */
+ struct FunctionRNA *func;
+} ParameterList;
typedef struct ParameterIterator {
- ParameterList *parms;
+ struct ParameterList *parms;
PointerRNA funcptr;
void *data;
int size, offset;
@@ -209,7 +218,7 @@ typedef enum StructFlag {
} StructFlag;
typedef int (*StructValidateFunc)(struct PointerRNA *ptr, void *data, int *have_function);
-typedef int (*StructCallbackFunc)(struct PointerRNA *ptr, struct FunctionRNA *func, struct ParameterList *list);
+typedef int (*StructCallbackFunc)(struct PointerRNA *ptr, struct FunctionRNA *func, ParameterList *list);
typedef void (*StructFreeFunc)(void *data);
typedef struct StructRNA *(*StructRegisterFunc)(const struct bContext *C, struct ReportList *reports, void *data,
StructValidateFunc validate, StructCallbackFunc call, StructFreeFunc free);