diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-03-04 00:36:09 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-03-04 00:36:09 +0400 |
commit | 35900761939465a3014ef58a12e9293d59575e32 (patch) | |
tree | e9fca2efa21e2b109084fca9b559593c30d9663f /source/blender/python/generic | |
parent | 95670e03a01d30cda5a0f685974f28790be6809d (diff) |
style cleanup - comment formatting
Diffstat (limited to 'source/blender/python/generic')
-rw-r--r-- | source/blender/python/generic/bgl.h | 4 | ||||
-rw-r--r-- | source/blender/python/generic/idprop_py_api.c | 16 | ||||
-rw-r--r-- | source/blender/python/generic/py_capi_utils.c | 24 |
3 files changed, 22 insertions, 22 deletions
diff --git a/source/blender/python/generic/bgl.h b/source/blender/python/generic/bgl.h index e23f4c2e86d..9df08882b8a 100644 --- a/source/blender/python/generic/bgl.h +++ b/source/blender/python/generic/bgl.h @@ -75,7 +75,7 @@ extern PyTypeObject BGL_bufferType; /*@ By golly George! It looks like fancy pants macro time!!! */ -/* +#if 0 /* unused so far */ #define int_str "i" #define int_var(number) bgl_int##number #define int_ref(number) &bgl_int##number @@ -85,7 +85,7 @@ extern PyTypeObject BGL_bufferType; #define float_var(number) bgl_float##number #define float_ref(number) &bgl_float##number #define float_def(number) float float_var(number) -*/ +#endif /* TYPE_str is the string to pass to Py_ArgParse (for the format) */ /* TYPE_var is the name to pass to the GL function */ diff --git a/source/blender/python/generic/idprop_py_api.c b/source/blender/python/generic/idprop_py_api.c index 4cff5cbca95..3462e6ee5d4 100644 --- a/source/blender/python/generic/idprop_py_api.c +++ b/source/blender/python/generic/idprop_py_api.c @@ -399,9 +399,9 @@ const char *BPy_IDProperty_Map_ValidateAndCreate(PyObject *name_obj, IDProperty if ((val.array.type= idp_sequence_type(ob)) == -1) return "only floats, ints and dicts are allowed in ID property arrays"; - /*validate sequence and derive type. - we assume IDP_INT unless we hit a float - number; then we assume it's */ + /* validate sequence and derive type. + * we assume IDP_INT unless we hit a float + * number; then we assume it's */ val.array.len = PySequence_Size(ob); @@ -443,8 +443,8 @@ const char *BPy_IDProperty_Map_ValidateAndCreate(PyObject *name_obj, IDProperty keys = PyMapping_Keys(ob); vals = PyMapping_Values(ob); - /*we allocate the group first; if we hit any invalid data, - we can delete it easily enough.*/ + /* we allocate the group first; if we hit any invalid data, + * we can delete it easily enough.*/ prop = IDP_New(IDP_GROUP, &val, name); len = PyMapping_Length(ob); for (i=0; i<len; i++) { @@ -666,9 +666,9 @@ static PyObject *BPy_IDGroup_Pop(BPy_IDProperty *self, PyObject *value) pyform = BPy_IDGroup_MapDataToPy(idprop); if (!pyform) { - /*ok something bad happened with the pyobject, - so don't remove the prop from the group. if pyform is - NULL, then it already should have raised an exception.*/ + /* ok something bad happened with the pyobject, + * so don't remove the prop from the group. if pyform is + * NULL, then it already should have raised an exception.*/ return NULL; } diff --git a/source/blender/python/generic/py_capi_utils.c b/source/blender/python/generic/py_capi_utils.c index e63e0146330..499a691156b 100644 --- a/source/blender/python/generic/py_capi_utils.c +++ b/source/blender/python/generic/py_capi_utils.c @@ -419,16 +419,16 @@ PyObject *PyC_UnicodeFromByte(const char *str) } /***************************************************************************** -* Description: This function creates a new Python dictionary object. -* note: dict is owned by sys.modules["__main__"] module, reference is borrowed -* note: important we use the dict from __main__, this is what python expects - for 'pickle' to work as well as strings like this... - >> foo = 10 - >> print(__import__("__main__").foo) -* -* note: this overwrites __main__ which gives problems with nested calles. -* be sure to run PyC_MainModule_Backup & PyC_MainModule_Restore if there is -* any chance that python is in the call stack. + * Description: This function creates a new Python dictionary object. + * note: dict is owned by sys.modules["__main__"] module, reference is borrowed + * note: important we use the dict from __main__, this is what python expects + * for 'pickle' to work as well as strings like this... + * >> foo = 10 + * >> print(__import__("__main__").foo) + * + * note: this overwrites __main__ which gives problems with nested calles. + * be sure to run PyC_MainModule_Backup & PyC_MainModule_Restore if there is + * any chance that python is in the call stack. *****************************************************************************/ PyObject *PyC_DefaultNameSpace(const char *filename) { @@ -475,7 +475,7 @@ void PyC_SetHomePath(const char *py_path_bundle) #ifdef __APPLE__ /* OSX allow file/directory names to contain : character (represented as / in the Finder) - but current Python lib (release 3.1.1) doesn't handle these correctly */ + * but current Python lib (release 3.1.1) doesn't handle these correctly */ if (strchr(py_path_bundle, ':')) printf("Warning : Blender application is located in a path containing : or / chars\ \nThis may make python import function fail\n"); @@ -483,7 +483,7 @@ void PyC_SetHomePath(const char *py_path_bundle) #ifdef _WIN32 /* cmake/MSVC debug build crashes without this, why only - in this case is unknown.. */ + * in this case is unknown.. */ { BLI_setenv("PYTHONPATH", py_path_bundle); } |