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 discards 9c0d7122590ec63c4a9cb6e5b019f373e84a6106 (commit) via 40459eab2c4a3af4a5eccd1b3cbe1bd94353f9c7 (commit)
This update added new revisions after undoing existing revisions. That is to say, the old revision is not a strict subset of the new revision. This situation occurs when you --force push a change and generate a repository containing something like this:
* -- * -- B -- O -- O -- O (9c0d7122590ec63c4a9cb6e5b019f373e84a6106) N -- N -- N (40459eab2c4a3af4a5eccd1b3cbe1bd94353f9c7)
When this happens we assume that you've already had alert emails for all of the O revisions, and so we here report only the revisions in the N branch from the common base, B.
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/40459eab2c4a3af4a5eccd1b3cbe1bd94353f...
commit 40459eab2c4a3af4a5eccd1b3cbe1bd94353f9c7 Author: Cyril Hrubis metan@ucw.cz Date: Mon Jun 4 16:22:41 2012 +0200
pywrap: Fix error reporting.
The python headers define _GNU_SOURCE so the strerror_r variant is GNU one, which may use the passed buffer to, but that is not guaranted it also may return pointer to some statically allocated buffer.
Also make sure _GNU_SOURCE is defined in pywrap.mk.
diff --git a/pylib/gfxprim/common.i b/pylib/gfxprim/common.i index 66b37b0..bc99ff3 100644 --- a/pylib/gfxprim/common.i +++ b/pylib/gfxprim/common.i @@ -23,11 +23,9 @@ %exception funcname { $action if (result == NULL) { - int errno0 = errno; - const int errbuf_len = 128; - char errbuf[errbuf_len]; - strerror_r(errno0, errbuf, errbuf_len); - PyErr_Format(PyExc_RuntimeError, "Error in function %s: %s", "$name", errbuf); + char errbuf[128]; + char *errmsg = strerror_r(errno, errbuf, sizeof(errbuf)); + PyErr_Format(PyExc_RuntimeError, "Error in function %s: %s", "$name", errmsg); return NULL; } } @@ -42,11 +40,9 @@ %exception funcname { $action if (result != 0) { - int errno0 = errno; - const int errbuf_len = 128; - char errbuf[errbuf_len]; - strerror_r(errno0, errbuf, errbuf_len); - PyErr_Format(PyExc_RuntimeError, "Error in function %s: %s", "$name", errbuf); + char errbuf[128]; + char *errmsg = strerror_r(errno, errbuf, sizeof(errbuf)); + PyErr_Format(PyExc_RuntimeError, "Error in function %s: %s", "$name", errmsg); return NULL; } } diff --git a/pywrap.mk b/pywrap.mk index 0ec5602..03d22cf 100644 --- a/pywrap.mk +++ b/pywrap.mk @@ -23,10 +23,10 @@ endif # VERBOSE
$(SWIG_LIB): $(SWIG_C) ifdef VERBOSE - $(CC) $< $(CFLAGS) $(LDFLAGS) -I$(PYTHON_INCLUDE) --shared -lGP $(LDLIBS) -L$(TOPDIR)/build/ -o $@ + $(CC) $< $(CFLAGS) -D_GNU_SOURCE=1 $(LDFLAGS) -I$(PYTHON_INCLUDE) --shared -lGP $(LDLIBS) -L$(TOPDIR)/build/ -o $@ else # VERBOSE @echo "LD $@" - @$(CC) $< $(CFLAGS) $(LDFLAGS) -I$(PYTHON_INCLUDE) --shared -lGP $(LDLIBS) -L$(TOPDIR)/build/ -o $@ + @$(CC) $< $(CFLAGS) -D_GNU_SOURCE=1 $(LDFLAGS) -I$(PYTHON_INCLUDE) --shared -lGP $(LDLIBS) -L$(TOPDIR)/build/ -o $@ endif # VERBOSE
endif # ifneq ($(SWIG),)
-----------------------------------------------------------------------
Summary of changes:
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.