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>2012-11-22 09:15:52 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-11-22 09:15:52 +0400
commit9d0334bc74b87fc47e54984e8ede7bea84a5b302 (patch)
tree7fef694c5a83c90aaa661388449db97e3ad3d5fc /source
parent55535b21feafd7bf22aa565e8048b02c0fc76cf7 (diff)
add missing bgl and gpu api docstrings (found using docstring completeness checker)
Diffstat (limited to 'source')
-rw-r--r--source/blender/python/generic/bgl.c22
-rw-r--r--source/tests/bl_rst_completeness.py2
-rw-r--r--source/tests/rst_to_doctree_mini.py12
3 files changed, 18 insertions, 18 deletions
diff --git a/source/blender/python/generic/bgl.c b/source/blender/python/generic/bgl.c
index a10bfef2a8d..22b9c1a2208 100644
--- a/source/blender/python/generic/bgl.c
+++ b/source/blender/python/generic/bgl.c
@@ -613,15 +613,15 @@ static PyObject *Buffer_repr(Buffer *self)
}
-BGL_Wrap(2, Accum, void, (GLenum, GLfloat))
-BGL_Wrap(1, ActiveTexture, void, (GLenum))
-BGL_Wrap(2, AlphaFunc, void, (GLenum, GLclampf))
+BGL_Wrap(2, Accum, void, (GLenum, GLfloat))
+BGL_Wrap(1, ActiveTexture, void, (GLenum))
+BGL_Wrap(2, AlphaFunc, void, (GLenum, GLclampf))
BGL_Wrap(3, AreTexturesResident, GLboolean, (GLsizei, GLuintP, GLbooleanP))
BGL_Wrap(2, AttachShader, void, (GLuint, GLuint))
-BGL_Wrap(1, Begin, void, (GLenum))
-BGL_Wrap(2, BindTexture, void, (GLenum, GLuint))
-BGL_Wrap(7, Bitmap, void, (GLsizei, GLsizei, GLfloat,
- GLfloat, GLfloat, GLfloat, GLubyteP))
+BGL_Wrap(1, Begin, void, (GLenum))
+BGL_Wrap(2, BindTexture, void, (GLenum, GLuint))
+BGL_Wrap(7, Bitmap, void, (GLsizei, GLsizei, GLfloat,
+ GLfloat, GLfloat, GLfloat, GLubyteP))
BGL_Wrap(2, BlendFunc, void, (GLenum, GLenum))
BGL_Wrap(1, CallList, void, (GLuint))
BGL_Wrap(3, CallLists, void, (GLsizei, GLenum, GLvoidP))
@@ -675,7 +675,7 @@ BGL_Wrap(1, CullFace, void, (GLenum))
BGL_Wrap(2, DeleteLists, void, (GLuint, GLsizei))
BGL_Wrap(1, DeleteProgram, void, (GLuint))
BGL_Wrap(1, DeleteShader, void, (GLuint))
-BGL_Wrap(2, DeleteTextures, void, (GLsizei, GLuintP))
+BGL_Wrap(2, DeleteTextures, void, (GLsizei, GLuintP))
BGL_Wrap(1, DepthFunc, void, (GLenum))
BGL_Wrap(1, DepthMask, void, (GLboolean))
BGL_Wrap(2, DepthRange, void, (GLclampd, GLclampd))
@@ -773,7 +773,7 @@ BGL_Wrap(3, Lighti, void, (GLenum, GLenum, GLint))
BGL_Wrap(3, Lightiv, void, (GLenum, GLenum, GLintP))
BGL_Wrap(2, LineStipple, void, (GLint, GLushort))
BGL_Wrap(1, LineWidth, void, (GLfloat))
-BGL_Wrap(1, LinkProgram, void, (GLuint))
+BGL_Wrap(1, LinkProgram, void, (GLuint))
BGL_Wrap(1, ListBase, void, (GLuint))
BGL_Wrap(1, LoadIdentity, void, (void))
BGL_Wrap(1, LoadMatrixd, void, (GLdoubleP))
@@ -1907,9 +1907,9 @@ PyObject *BPyInit_bgl(void)
return submodule;
}
-static PyObject *Method_ShaderSource (PyObject *UNUSED(self), PyObject *args)
+static PyObject *Method_ShaderSource(PyObject *UNUSED(self), PyObject *args)
{
- int shader;
+ unsigned int shader;
char *source;
if (!PyArg_ParseTuple(args, "Is", &shader, &source))
diff --git a/source/tests/bl_rst_completeness.py b/source/tests/bl_rst_completeness.py
index 175d0a4231b..e9e2779bda8 100644
--- a/source/tests/bl_rst_completeness.py
+++ b/source/tests/bl_rst_completeness.py
@@ -29,6 +29,7 @@ exec(compile(open(filepath).read(), filepath, 'exec'))
'''
import os
+
THIS_DIR = os.path.dirname(__file__)
RST_DIR = os.path.normpath(os.path.join(THIS_DIR, "..", "..", "doc", "python_api", "rst"))
@@ -138,7 +139,6 @@ def main():
if bge is None:
print("Skipping BGE modules!")
- continue
for filename, modname, partial_ok in modules:
if bge is None and modname.startswith("bge"):
diff --git a/source/tests/rst_to_doctree_mini.py b/source/tests/rst_to_doctree_mini.py
index 19c20ccc006..181037299cf 100644
--- a/source/tests/rst_to_doctree_mini.py
+++ b/source/tests/rst_to_doctree_mini.py
@@ -47,7 +47,8 @@ def parse_rst_py(filepath):
re_prefix = re.compile(r"^\.\.\s([a-zA-Z09\-]+)::\s*(.*)\s*$")
tree = collections.defaultdict(list)
-
+ indent_map = {}
+ indent_prev = 0
f = open(filepath, encoding="utf-8")
indent_lists = []
for i, line in enumerate(f):
@@ -70,12 +71,11 @@ def parse_rst_py(filepath):
members=[])
tree[indent].append(item)
+ if indent_prev < indent:
+ indent_map[indent] = indent_prev
if indent > 0:
- # get the previous indent, ok this isn't fast but no matter.
- keys = list(sorted(tree.keys()))
- key_index = keys.index(indent)
- parent_indent = keys[key_index - 1]
- tree[parent_indent][-1].members.append(item)
+ tree[indent_map[indent]][-1].members.append(item)
+ indent_prev = indent
f.close()
return tree[0]