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:
authorWillian Padovani Germano <wpgermano@gmail.com>2003-06-28 11:38:21 +0400
committerWillian Padovani Germano <wpgermano@gmail.com>2003-06-28 11:38:21 +0400
commiteaf1cdd3836aa425e3dc6f1a11d4556bd7e3e876 (patch)
treefe8e701c3e3daa38749b78238858edbbbfea1f91 /source/blender/python/api2_2x/constant.c
parent569a32a2ea3a1992eaeaa5dc0256c48e8a053fbd (diff)
- More renaming all around to follow our conventions
- Implemented partially Blender.Sys - Worked on issues related to sys, path - Took away most "debug" printfs
Diffstat (limited to 'source/blender/python/api2_2x/constant.c')
-rw-r--r--source/blender/python/api2_2x/constant.c58
1 files changed, 28 insertions, 30 deletions
diff --git a/source/blender/python/api2_2x/constant.c b/source/blender/python/api2_2x/constant.c
index 16dad732a48..208d17777db 100644
--- a/source/blender/python/api2_2x/constant.c
+++ b/source/blender/python/api2_2x/constant.c
@@ -37,12 +37,12 @@
/*****************************************************************************/
/* Python constant_Type callback function prototypes: */
/*****************************************************************************/
-static void constantDeAlloc (C_constant *cam);
-static PyObject *constantGetAttr (C_constant *cam, char *name);
-static PyObject *constantRepr (C_constant *cam);
-static int constantLength(C_constant *self);
-static PyObject *constantSubscript(C_constant *self, PyObject *key);
-static int constantAssSubscript(C_constant *self, PyObject *who,
+static void constant_dealloc (BPy_constant *cam);
+static PyObject *constant_getAttr (BPy_constant *cam, char *name);
+static PyObject *constant_repr (BPy_constant *cam);
+static int constantLength(BPy_constant *self);
+static PyObject *constantSubscript(BPy_constant *self, PyObject *key);
+static int constantAssSubscript(BPy_constant *self, PyObject *who,
PyObject *cares);
/*****************************************************************************/
@@ -62,16 +62,16 @@ PyTypeObject constant_Type =
{
PyObject_HEAD_INIT(NULL)
0, /* ob_size */
- "constant", /* tp_name */
- sizeof (C_constant), /* tp_basicsize */
+ "Blender constant", /* tp_name */
+ sizeof (BPy_constant), /* tp_basicsize */
0, /* tp_itemsize */
/* methods */
- (destructor)constantDeAlloc, /* tp_dealloc */
+ (destructor)constant_dealloc, /* tp_dealloc */
0, /* tp_print */
- (getattrfunc)constantGetAttr, /* tp_getattr */
+ (getattrfunc)constant_getAttr, /* tp_getattr */
0, /* tp_setattr */
0, /* tp_compare */
- (reprfunc)constantRepr, /* tp_repr */
+ (reprfunc)constant_repr, /* tp_repr */
0, /* tp_as_number */
0, /* tp_as_sequence */
&constantAsMapping, /* tp_as_mapping */
@@ -95,13 +95,11 @@ PyObject *M_constant_New(void) /* can't be static, we call it in other files */
static PyObject *new_const(void)
{ /* this is the static one */
- C_constant *constant;
+ BPy_constant *constant;
constant_Type.ob_type = &PyType_Type;
- printf ("In constant_New()\n");
-
- constant = (C_constant *)PyObject_NEW(C_constant, &constant_Type);
+ constant = (BPy_constant *)PyObject_NEW(BPy_constant, &constant_Type);
if (constant == NULL)
return (PythonReturnErrorObject (PyExc_MemoryError,
@@ -115,31 +113,31 @@ static PyObject *new_const(void)
}
/*****************************************************************************/
-/* Python C_constant methods: */
+/* Python BPy_constant methods: */
/*****************************************************************************/
-int constant_insert (C_constant *self, char *name, PyObject *value)
+int constant_insert (BPy_constant *self, char *name, PyObject *value)
{
return PyDict_SetItemString (self->dict, name, value);
}
/*****************************************************************************/
-/* Function: constantDeAlloc */
-/* Description: This is a callback function for the C_constant type. It is */
+/* Function: constant_dealloc */
+/* Description: This is a callback function for the BPy_constant type. It is */
/* the destructor function. */
/*****************************************************************************/
-static void constantDeAlloc (C_constant *self)
+static void constant_dealloc (BPy_constant *self)
{
Py_DECREF(self->dict);
PyObject_DEL (self);
}
/*****************************************************************************/
-/* Function: constantGetAttr */
-/* Description: This is a callback function for the C_constant type. It is */
-/* the function that accesses C_constant member variables and */
+/* Function: constant_getAttr */
+/* Description: This is a callback function for the BPy_constant type. It is */
+/* the function that accesses BPy_constant member variables and */
/* methods. */
/*****************************************************************************/
-static PyObject *constantGetAttr (C_constant *self, char *name)
+static PyObject *constant_getAttr (BPy_constant *self, char *name)
{
if (self->dict)
{
@@ -166,12 +164,12 @@ static PyObject *constantGetAttr (C_constant *self, char *name)
/* These functions provide code to access constant objects as */
/* mappings. */
/*****************************************************************************/
-static int constantLength(C_constant *self)
+static int constantLength(BPy_constant *self)
{
return 0;
}
-static PyObject *constantSubscript(C_constant *self, PyObject *key)
+static PyObject *constantSubscript(BPy_constant *self, PyObject *key)
{
if (self->dict) {
PyObject *v = PyDict_GetItem(self->dict, key);
@@ -185,7 +183,7 @@ static PyObject *constantSubscript(C_constant *self, PyObject *key)
return NULL;
}
-static int constantAssSubscript(C_constant *self, PyObject *who,
+static int constantAssSubscript(BPy_constant *self, PyObject *who,
PyObject *cares)
{
/* no user assignments allowed */
@@ -193,11 +191,11 @@ static int constantAssSubscript(C_constant *self, PyObject *who,
}
/*****************************************************************************/
-/* Function: constantRepr */
-/* Description: This is a callback function for the C_constant type. It */
+/* Function: constant_repr */
+/* Description: This is a callback function for the BPy_constant type. It */
/* builds a meaninful string to represent constant objects. */
/*****************************************************************************/
-static PyObject *constantRepr (C_constant *self)
+static PyObject *constant_repr (BPy_constant *self)
{
PyObject *repr = PyObject_Repr(self->dict);
return repr;