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:
authorJoseph Gilbert <ascotan@gmail.com>2005-08-17 18:26:00 +0400
committerJoseph Gilbert <ascotan@gmail.com>2005-08-17 18:26:00 +0400
commit8b060dd5adfe5d56f558e4a600717f2b755d8559 (patch)
treeadd7c4df0056bf27f4397ea62162668956630d49 /source/blender/python/api2_2x/constant.h
parent2872263377aa48233bc4e6a8f298a3706464288c (diff)
- update to constant.c
- give it the key/items interface - creates some factory functions for const generation - genutils methods - method for getting module constants - method for throwing errors with a print string - updates to function names - clean up interpreter launch a bit
Diffstat (limited to 'source/blender/python/api2_2x/constant.h')
-rw-r--r--source/blender/python/api2_2x/constant.h29
1 files changed, 10 insertions, 19 deletions
diff --git a/source/blender/python/api2_2x/constant.h b/source/blender/python/api2_2x/constant.h
index 1b92dfab2be..9cd0aadc6f9 100644
--- a/source/blender/python/api2_2x/constant.h
+++ b/source/blender/python/api2_2x/constant.h
@@ -25,7 +25,7 @@
*
* This is a new part of Blender.
*
- * Contributor(s): Willian P. Germano
+ * Contributor(s): Willian P. Germano, Joseph Gilbert
*
* ***** END GPL/BL DUAL LICENSE BLOCK *****
*/
@@ -35,28 +35,19 @@
#include <Python.h>
+//-------------------TYPE CHECKS---------------------------------
#define BPy_Constant_Check(v) ((v)->ob_type==&constant_Type)
-
-/* Objects of <type 'constant'> are used inside many other Blender Python
- * objects, so this header file must contain only 'public' declarations */
-
-/*****************************************************************************/
-/* Python API function prototypes for the constant module. */
-/*****************************************************************************/
-PyObject *M_constant_New( void );
-
-/*****************************************************************************/
-/* Python BPy_constant structure definition: */
-/*****************************************************************************/
+//-------------------TYPEOBJECT----------------------------------
+PyTypeObject constant_Type;
+//-------------------STRUCT DEFINITION---------------------------
typedef struct {
PyObject_HEAD
PyObject * dict;
-
} BPy_constant;
-
-/*****************************************************************************/
-/* Python BPy_constant methods declarations: */
-/*****************************************************************************/
-int constant_insert( BPy_constant * self, char *name, PyObject * value );
+//-------------------VISIBLE PROTOTYPES-------------------------
+PyObject *PyConstant_New(void);
+int PyConstant_Insert(BPy_constant *self, char *name, PyObject *value);
+PyObject *PyConstant_NewInt(char *name, int value);
+PyObject *PyConstant_NewString(char *name, char *value);
#endif /* EXPP_constant_H */