This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project gfxprim.git.
The branch, master has been updated via 1a6ee3086c94fc16d12a2115ca78501255758ea3 (commit) via 0e3b39d5a7f1768f2376ab976d06e96005ce9976 (commit) via 38cc4005d4cc548821fe46e9fdbdc49b1d6df89b (commit) from 783b82f4bafe393e889c536cd6dfe743f21f732d (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- http://repo.or.cz/w/gfxprim.git/commit/1a6ee3086c94fc16d12a2115ca78501255758...
commit 1a6ee3086c94fc16d12a2115ca78501255758ea3 Author: Cyril Hrubis metan@ucw.cz Date: Tue Jun 4 22:52:00 2013 +0200
pylib: Add custom comment filter and use it descr
Add custom comment filter that adds ' *' to each line of the input.
Make use of the filter to convert descr block into nice C comment.
Signed-off-by: Cyril Hrubis metan@ucw.cz
diff --git a/pylib/gp_codegen/render_utils.py b/pylib/gp_codegen/render_utils.py index be9b32d..cf3d7d4 100644 --- a/pylib/gp_codegen/render_utils.py +++ b/pylib/gp_codegen/render_utils.py @@ -7,6 +7,26 @@ import os import time import re
+# Custom filters + +def comment(lines): + """Adds space and asterisk before each line from lines""" + ret = '' + l = lines.split('n') + + # Remove leading empty line + if l[0] == '': + l = l[1:] + + # Remove traling empty line + if l[-1] == '': + l.pop() + + for i in l: + ret += ' * ' + i + 'n' + + return ret + try: import jinja2 except: @@ -33,11 +53,13 @@ def create_environment(config, template_dir): env.globals['error'] = template_error env.globals['hex'] = lambda x: hex(x).rstrip('L') # Propagate some python buildins - env.globals['int'] = int; - env.globals['float'] = float; - env.globals['round'] = round; - env.globals['min'] = min; - env.globals['max'] = max; + env.globals['int'] = int + env.globals['float'] = float + env.globals['round'] = round + env.globals['min'] = min + env.globals['max'] = max + # Add custom filters + env.filters['comment'] = comment return env
@@ -65,7 +87,6 @@ def render_file(env, source, result): finally: result_file.close()
- def load_gfxprimconfig(config_file = None): """Initialize GfxPrimConfig from a given or guessed config file. Looks for the file by parameter, in env['PIXELTYPE_DEFS'] and diff --git a/pylib/templates/base.c.t b/pylib/templates/base.c.t index 57c957a..d8575e3 100644 --- a/pylib/templates/base.c.t +++ b/pylib/templates/base.c.t @@ -4,7 +4,10 @@ * GENERATED on {{ date }} from {{ template }} * DO NOT MODIFY THIS FILE DIRECTLY! * - * {% block descr %}{% endblock %} +%% filter comment() +%% block descr +%% endblock +%% endfilter */
%% block pre_body_guard
http://repo.or.cz/w/gfxprim.git/commit/0e3b39d5a7f1768f2376ab976d06e96005ce9...
commit 0e3b39d5a7f1768f2376ab976d06e96005ce9976 Author: Cyril Hrubis metan@ucw.cz Date: Tue Jun 4 22:50:44 2013 +0200
templates: Fix description block id, add description
The description block id is descr not description
Add description block where it's missing
Signed-off-by: Cyril Hrubis metan@ucw.cz
diff --git a/include/core/GP_FnPerBpp.gen.h.t b/include/core/GP_FnPerBpp.gen.h.t index a53fbd5..11d5002 100644 --- a/include/core/GP_FnPerBpp.gen.h.t +++ b/include/core/GP_FnPerBpp.gen.h.t @@ -22,7 +22,7 @@
%% extends 'base.h.t'
-{% block description %}All FnPerBpp macros{% endblock %} +{% block descr %}All FnPerBpp macros{% endblock %}
{% block body %}
diff --git a/include/core/GP_Pixel.gen.h.t b/include/core/GP_Pixel.gen.h.t index d6e7659..aab38df 100644 --- a/include/core/GP_Pixel.gen.h.t +++ b/include/core/GP_Pixel.gen.h.t @@ -24,7 +24,7 @@ %% extends "base.h.t"
%% block descr -Pixel type definitions and functions +Pixel type definitions and functions. Do not include directly, use GP_Pixel.h %% endblock
diff --git a/include/core/GP_WritePixel.gen.h.t b/include/core/GP_WritePixel.gen.h.t index 91237bc..b4ce29e 100644 --- a/include/core/GP_WritePixel.gen.h.t +++ b/include/core/GP_WritePixel.gen.h.t @@ -22,7 +22,7 @@
%% extends 'base.h.t'
-{% block description %}Write Pixels generated header{% endblock %} +{% block descr %}Write Pixels generated header{% endblock %}
{% block body %}
diff --git a/include/gfx/GP_HLine.gen.h.t b/include/gfx/GP_HLine.gen.h.t index 873f727..8e696a7 100644 --- a/include/gfx/GP_HLine.gen.h.t +++ b/include/gfx/GP_HLine.gen.h.t @@ -22,7 +22,7 @@
%% extends 'base.h.t'
-{% block description %}HLine generated header{% endblock %} +{% block descr %}HLine generated header{% endblock %}
{% block body %}
diff --git a/include/gfx/GP_VLine.gen.h.t b/include/gfx/GP_VLine.gen.h.t index 296e69a..11a8702 100644 --- a/include/gfx/GP_VLine.gen.h.t +++ b/include/gfx/GP_VLine.gen.h.t @@ -22,7 +22,7 @@
%% extends 'base.h.t'
-{% block description %}VLine generated header{% endblock %} +{% block descr %}VLine generated header{% endblock %}
{% block body %}
diff --git a/libs/gfx/GP_VLine.gen.c.t b/libs/gfx/GP_VLine.gen.c.t index 8700d8f..ad949e9 100644 --- a/libs/gfx/GP_VLine.gen.c.t +++ b/libs/gfx/GP_VLine.gen.c.t @@ -22,7 +22,7 @@
%% extends 'base.h.t'
-{% block description %}Vertical Line{% endblock %} +{% block descr %}Vertical Line{% endblock %}
{% block body %}
diff --git a/tests/core/BlitConv.gen.c.t b/tests/core/BlitConv.gen.c.t index 3305c0e..b6d02af 100644 --- a/tests/core/BlitConv.gen.c.t +++ b/tests/core/BlitConv.gen.c.t @@ -22,6 +22,8 @@
%% extends "base.test.c.t"
+{% block descr %}Blit conversions tests.{% endblock %} + %% block body
#include <stdio.h> diff --git a/tests/core/Convert.gen.c.t b/tests/core/Convert.gen.c.t index 3c418b0..8e9cf2a 100644 --- a/tests/core/Convert.gen.c.t +++ b/tests/core/Convert.gen.c.t @@ -22,6 +22,8 @@
%% extends "base.test.c.t"
+{% block descr %}Pixel conversions tests.{% endblock %} + %% block body
#include <stdio.h> diff --git a/tests/core/Convert_Scale.gen.c.t b/tests/core/Convert_Scale.gen.c.t index 8e67da4..f61e9bd 100644 --- a/tests/core/Convert_Scale.gen.c.t +++ b/tests/core/Convert_Scale.gen.c.t @@ -22,6 +22,8 @@
%% extends "base.test.c.t"
+{% block descr %}ConvertScale tests.{% endblock %} + %% block body
#include <stdio.h> diff --git a/tests/core/GetPutPixel.gen.c.t b/tests/core/GetPutPixel.gen.c.t index 05ffbdd..a843509 100644 --- a/tests/core/GetPutPixel.gen.c.t +++ b/tests/core/GetPutPixel.gen.c.t @@ -22,6 +22,8 @@
%% extends "base.test.c.t"
+{% block descr %}GetPutPixel tests.{% endblock %} + %% block body
#include <stdio.h> diff --git a/tests/core/WritePixel.gen.c.t b/tests/core/WritePixel.gen.c.t index c1aff24..9ec20c6 100644 --- a/tests/core/WritePixel.gen.c.t +++ b/tests/core/WritePixel.gen.c.t @@ -22,6 +22,8 @@
%% extends "base.test.c.t"
+{% block descr %}WritePixel tests.{% endblock %} + %% block body
#include <stdio.h> diff --git a/tests/filters/APICoverage.gen.c.t b/tests/filters/APICoverage.gen.c.t index b7d153f..ab22dd0 100644 --- a/tests/filters/APICoverage.gen.c.t +++ b/tests/filters/APICoverage.gen.c.t @@ -29,6 +29,8 @@
%% extends "base.test.c.t"
+{% block descr %}Filters API coverage tests.{% endblock %} + %% block body
#include <stdio.h> diff --git a/tests/gfx/APICoverage.gen.c.t b/tests/gfx/APICoverage.gen.c.t index 453e1ed..1afea7e 100644 --- a/tests/gfx/APICoverage.gen.c.t +++ b/tests/gfx/APICoverage.gen.c.t @@ -29,6 +29,8 @@
%% extends "base.test.c.t"
+{% block descr %}GFX API converage tests.{% endblock %} + %% block body
#include <stdio.h>
http://repo.or.cz/w/gfxprim.git/commit/38cc4005d4cc548821fe46e9fdbdc49b1d6df...
commit 38cc4005d4cc548821fe46e9fdbdc49b1d6df89b Author: Cyril Hrubis metan@ucw.cz Date: Mon Jun 3 20:12:55 2013 +0200
pywrap: Remove silence_swig_warnings.mk
Different swig versions vs compiler versions generate different warnings. There is no point in silencing just one of them.
And swig authors seems to be good enough in fixing these, just make sure to update to new enough swig and this shouldn't be a problem.
Signed-off-by: Cyril Hrubis metan@ucw.cz
diff --git a/pylib/gfxprim/backends/Makefile b/pylib/gfxprim/backends/Makefile index 320165e..2353ed9 100644 --- a/pylib/gfxprim/backends/Makefile +++ b/pylib/gfxprim/backends/Makefile @@ -10,5 +10,3 @@ INSTALL_FILES+=_extend_backend.py
include $(TOPDIR)/pywrap.mk include $(TOPDIR)/post.mk - -include ../silence_swig_warnings.mk diff --git a/pylib/gfxprim/core/Makefile b/pylib/gfxprim/core/Makefile index ada5a6c..476d623 100644 --- a/pylib/gfxprim/core/Makefile +++ b/pylib/gfxprim/core/Makefile @@ -9,5 +9,3 @@ $(SWIG_C): ../common.i INSTALL_FILES+=C.py
include $(TOPDIR)/post.mk - -include ../silence_swig_warnings.mk diff --git a/pylib/gfxprim/filters/Makefile b/pylib/gfxprim/filters/Makefile index a7f3dbe..b1faad7 100644 --- a/pylib/gfxprim/filters/Makefile +++ b/pylib/gfxprim/filters/Makefile @@ -5,5 +5,3 @@ INCLUDE=core include $(TOPDIR)/pre.mk include $(TOPDIR)/pywrap.mk include $(TOPDIR)/post.mk - -include ../silence_swig_warnings.mk diff --git a/pylib/gfxprim/gfx/Makefile b/pylib/gfxprim/gfx/Makefile index b0e7e60..8b16fee 100644 --- a/pylib/gfxprim/gfx/Makefile +++ b/pylib/gfxprim/gfx/Makefile @@ -8,5 +8,3 @@ INSTALL_FILES+=C.py
include $(TOPDIR)/pywrap.mk include $(TOPDIR)/post.mk - -include ../silence_swig_warnings.mk diff --git a/pylib/gfxprim/grabbers/Makefile b/pylib/gfxprim/grabbers/Makefile index c864378..2a80492 100644 --- a/pylib/gfxprim/grabbers/Makefile +++ b/pylib/gfxprim/grabbers/Makefile @@ -8,5 +8,3 @@ LDLIBS+=$(LDLIBS_GRABBERS)
include $(TOPDIR)/pywrap.mk include $(TOPDIR)/post.mk - -include ../silence_swig_warnings.mk diff --git a/pylib/gfxprim/input/Makefile b/pylib/gfxprim/input/Makefile index 3430bc9..76eaaf8 100644 --- a/pylib/gfxprim/input/Makefile +++ b/pylib/gfxprim/input/Makefile @@ -4,5 +4,3 @@ LIBNAME=input include $(TOPDIR)/pre.mk include $(TOPDIR)/pywrap.mk include $(TOPDIR)/post.mk - -include ../silence_swig_warnings.mk diff --git a/pylib/gfxprim/loaders/Makefile b/pylib/gfxprim/loaders/Makefile index 883a266..600d233 100644 --- a/pylib/gfxprim/loaders/Makefile +++ b/pylib/gfxprim/loaders/Makefile @@ -11,5 +11,3 @@ include $(TOPDIR)/pywrap.mk $(SWIG_C): ../common.i
include $(TOPDIR)/post.mk - -include ../silence_swig_warnings.mk diff --git a/pylib/gfxprim/silence_swig_warnings.mk b/pylib/gfxprim/silence_swig_warnings.mk deleted file mode 100644 index 38916e0..0000000 --- a/pylib/gfxprim/silence_swig_warnings.mk +++ /dev/null @@ -1,4 +0,0 @@ -# -# Turn off warnings generated bugs in swig implementation -# -CFLAGS+=-Wno-missing-field-initializers -Wno-unused-parameter diff --git a/pylib/gfxprim/text/Makefile b/pylib/gfxprim/text/Makefile index 2ae37f9..7cd01e7 100644 --- a/pylib/gfxprim/text/Makefile +++ b/pylib/gfxprim/text/Makefile @@ -8,5 +8,3 @@ INSTALL_FILES+=C.py
include $(TOPDIR)/pywrap.mk include $(TOPDIR)/post.mk - -include ../silence_swig_warnings.mk
-----------------------------------------------------------------------
Summary of changes: include/core/GP_FnPerBpp.gen.h.t | 2 +- include/core/GP_Pixel.gen.h.t | 2 +- include/core/GP_WritePixel.gen.h.t | 2 +- include/gfx/GP_HLine.gen.h.t | 2 +- include/gfx/GP_VLine.gen.h.t | 2 +- libs/gfx/GP_VLine.gen.c.t | 2 +- pylib/gfxprim/backends/Makefile | 2 - pylib/gfxprim/core/Makefile | 2 - pylib/gfxprim/filters/Makefile | 2 - pylib/gfxprim/gfx/Makefile | 2 - pylib/gfxprim/grabbers/Makefile | 2 - pylib/gfxprim/input/Makefile | 2 - pylib/gfxprim/loaders/Makefile | 2 - pylib/gfxprim/silence_swig_warnings.mk | 4 --- pylib/gfxprim/text/Makefile | 2 - pylib/gp_codegen/render_utils.py | 33 ++++++++++++++++++++++++++----- pylib/templates/base.c.t | 5 +++- tests/core/BlitConv.gen.c.t | 2 + tests/core/Convert.gen.c.t | 2 + tests/core/Convert_Scale.gen.c.t | 2 + tests/core/GetPutPixel.gen.c.t | 2 + tests/core/WritePixel.gen.c.t | 2 + tests/filters/APICoverage.gen.c.t | 2 + tests/gfx/APICoverage.gen.c.t | 2 + 24 files changed, 51 insertions(+), 33 deletions(-) delete mode 100644 pylib/gfxprim/silence_swig_warnings.mk
repo.or.cz automatic notification. Contact project admin jiri.bluebear.dluhos@gmail.com if you want to unsubscribe, or site admin admin@repo.or.cz if you receive no reply.