summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2019-11-12 15:20:07 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2019-11-12 15:20:07 +0900
commit478150ad4e1d828cd9a7e500314d1dd2a273b73e (patch)
tree498ea6fcc835258afcb492a7e99ffa67d8701528 /python
parent5d63feac1d0058fc1ad291efc1003437becbd9fa (diff)
downloadlibxslt-478150ad4e1d828cd9a7e500314d1dd2a273b73e.tar.gz
libxslt-478150ad4e1d828cd9a7e500314d1dd2a273b73e.tar.bz2
libxslt-478150ad4e1d828cd9a7e500314d1dd2a273b73e.zip
Imported Upstream version 1.1.34upstream/1.1.34
Diffstat (limited to 'python')
-rw-r--r--python/Makefile.am4
-rw-r--r--python/Makefile.in55
-rw-r--r--python/TODO0
-rw-r--r--python/libxslt.c25
-rw-r--r--python/tests/Makefile.am11
-rw-r--r--python/tests/Makefile.in29
-rwxr-xr-xpython/tests/basic.py1
-rwxr-xr-xpython/tests/exslt.py1
-rw-r--r--python/tests/extelem.py1
-rwxr-xr-xpython/tests/extfunc.py1
10 files changed, 92 insertions, 36 deletions
diff --git a/python/Makefile.am b/python/Makefile.am
index fa58b78f..17a0d17c 100644
--- a/python/Makefile.am
+++ b/python/Makefile.am
@@ -7,7 +7,7 @@ AM_CFLAGS = $(LIBXML_CFLAGS)
DOCS_DIR = $(datadir)/doc/libxslt-python-$(LIBXSLT_VERSION)
# libxsltclass.txt is generated
-DOCS = TODO
+DOCS=
EXTRA_DIST = \
libxslt.c \
@@ -19,7 +19,7 @@ EXTRA_DIST = \
libxslt-python-api.xml \
$(DOCS)
-libxsltmod_la_LDFLAGS = $(WIN32_EXTRA_LDFLAGS) -module -avoid-version
+libxsltmod_la_LDFLAGS = -module -avoid-version
if WITH_PYTHON
mylibs = \
diff --git a/python/Makefile.in b/python/Makefile.in
index 4fb0d6de..00c80a05 100644
--- a/python/Makefile.in
+++ b/python/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.15.1 from Makefile.am.
+# Makefile.in generated by automake 1.16.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2017 Free Software Foundation, Inc.
+# Copyright (C) 1994-2018 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -159,7 +159,10 @@ am__v_at_0 = @
am__v_at_1 =
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/depcomp
-am__depfiles_maybe = depfiles
+am__maybe_remake_depfiles = depfiles
+am__depfiles_remade = ./$(DEPDIR)/libxsltmod_la-libxslt-py.Plo \
+ ./$(DEPDIR)/libxsltmod_la-libxslt.Plo \
+ ./$(DEPDIR)/libxsltmod_la-types.Plo
am__mv = mv -f
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
@@ -201,7 +204,7 @@ am__recursive_targets = \
$(RECURSIVE_CLEAN_TARGETS) \
$(am__extra_recursive_targets)
AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
- distdir
+ distdir distdir-am
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
# Read a list of newline-separated strings from the standard input,
# and print each of them once, without duplicates. Input order is
@@ -222,7 +225,7 @@ am__define_uniq_tagged_files = \
ETAGS = etags
CTAGS = ctags
DIST_SUBDIRS = $(SUBDIRS)
-am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp TODO
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
am__relativize = \
dir0=`pwd`; \
@@ -278,6 +281,7 @@ EXEEXT = @EXEEXT@
EXSLT_INCLUDEDIR = @EXSLT_INCLUDEDIR@
EXSLT_LIBDIR = @EXSLT_LIBDIR@
EXSLT_LIBS = @EXSLT_LIBS@
+EXSLT_PRIVATE_LIBS = @EXSLT_PRIVATE_LIBS@
EXTRA_LIBS = @EXTRA_LIBS@
FGREP = @FGREP@
GREP = @GREP@
@@ -357,12 +361,11 @@ STRIP = @STRIP@
THREAD_LIBS = @THREAD_LIBS@
VERSION = @VERSION@
VERSION_SCRIPT_FLAGS = @VERSION_SCRIPT_FLAGS@
-WIN32_EXTRA_LDFLAGS = @WIN32_EXTRA_LDFLAGS@
-WIN32_EXTRA_LIBADD = @WIN32_EXTRA_LIBADD@
WITH_CRYPTO = @WITH_CRYPTO@
WITH_DEBUGGER = @WITH_DEBUGGER@
WITH_MEM_DEBUG = @WITH_MEM_DEBUG@
WITH_MODULES = @WITH_MODULES@
+WITH_PROFILER = @WITH_PROFILER@
WITH_TRIO = @WITH_TRIO@
WITH_XSLT_DEBUG = @WITH_XSLT_DEBUG@
XMLLINT = @XMLLINT@
@@ -372,6 +375,7 @@ XSLTPROCDV = @XSLTPROCDV@
XSLT_INCLUDEDIR = @XSLT_INCLUDEDIR@
XSLT_LIBDIR = @XSLT_LIBDIR@
XSLT_LIBS = @XSLT_LIBS@
+XSLT_PRIVATE_LIBS = @XSLT_PRIVATE_LIBS@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
@@ -432,7 +436,7 @@ SUBDIRS = . tests
AM_CFLAGS = $(LIBXML_CFLAGS)
DOCS_DIR = $(datadir)/doc/libxslt-python-$(LIBXSLT_VERSION)
# libxsltclass.txt is generated
-DOCS = TODO
+DOCS =
EXTRA_DIST = \
libxslt.c \
types.c \
@@ -443,7 +447,7 @@ EXTRA_DIST = \
libxslt-python-api.xml \
$(DOCS)
-libxsltmod_la_LDFLAGS = $(WIN32_EXTRA_LDFLAGS) -module -avoid-version
+libxsltmod_la_LDFLAGS = -module -avoid-version
@WITH_PYTHON_TRUE@mylibs = \
@WITH_PYTHON_TRUE@ $(top_builddir)/libxslt/libxslt.la \
@WITH_PYTHON_TRUE@ $(top_builddir)/libexslt/libexslt.la
@@ -488,8 +492,8 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
@@ -545,9 +549,15 @@ mostlyclean-compile:
distclean-compile:
-rm -f *.tab.c
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libxsltmod_la-libxslt-py.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libxsltmod_la-libxslt.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libxsltmod_la-types.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libxsltmod_la-libxslt-py.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libxsltmod_la-libxslt.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libxsltmod_la-types.Plo@am__quote@ # am--include-marker
+
+$(am__depfiles_remade):
+ @$(MKDIR_P) $(@D)
+ @echo '# dummy' >$@-t && $(am__mv) $@-t $@
+
+am--depfiles: $(am__depfiles_remade)
.c.o:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@@ -696,7 +706,10 @@ cscopelist-am: $(am__tagged_files)
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-distdir: $(DISTFILES)
+distdir: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) distdir-am
+
+distdir-am: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
@@ -791,15 +804,17 @@ distclean-generic:
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
-@WITH_PYTHON_FALSE@install-data-local:
@WITH_PYTHON_FALSE@uninstall-local:
+@WITH_PYTHON_FALSE@install-data-local:
clean: clean-recursive
clean-am: clean-generic clean-libtool clean-pythonLTLIBRARIES \
mostlyclean-am
distclean: distclean-recursive
- -rm -rf ./$(DEPDIR)
+ -rm -f ./$(DEPDIR)/libxsltmod_la-libxslt-py.Plo
+ -rm -f ./$(DEPDIR)/libxsltmod_la-libxslt.Plo
+ -rm -f ./$(DEPDIR)/libxsltmod_la-types.Plo
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-tags
@@ -845,7 +860,9 @@ install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-recursive
- -rm -rf ./$(DEPDIR)
+ -rm -f ./$(DEPDIR)/libxsltmod_la-libxslt-py.Plo
+ -rm -f ./$(DEPDIR)/libxsltmod_la-libxslt.Plo
+ -rm -f ./$(DEPDIR)/libxsltmod_la-types.Plo
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
@@ -867,7 +884,7 @@ uninstall-am: uninstall-local uninstall-pythonLTLIBRARIES
.MAKE: $(am__recursive_targets) install-am install-strip
.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am all-local \
- check check-am clean clean-generic clean-libtool \
+ am--depfiles check check-am clean clean-generic clean-libtool \
clean-pythonLTLIBRARIES cscopelist-am ctags ctags-am distclean \
distclean-compile distclean-generic distclean-libtool \
distclean-tags distdir dvi dvi-am html html-am info info-am \
diff --git a/python/TODO b/python/TODO
deleted file mode 100644
index e69de29b..00000000
--- a/python/TODO
+++ /dev/null
diff --git a/python/libxslt.c b/python/libxslt.c
index ee26d689..f8371b7b 100644
--- a/python/libxslt.c
+++ b/python/libxslt.c
@@ -23,8 +23,29 @@
#include <stdio.h>
#include <stddef.h>
-#if (defined(_MSC_VER) || defined(__MINGW32__)) && !defined(vsnprintf)
-#define vsnprintf(b,c,f,a) _vsnprintf(b,c,f,a)
+#ifdef _MSC_VER
+
+/* snprintf emulation taken from http://stackoverflow.com/a/8712996/1956010 */
+#if _MSC_VER < 1900
+
+#include <stdarg.h>
+
+#define vsnprintf c99_vsnprintf
+
+__inline int c99_vsnprintf(char *outBuf, size_t size, const char *format, va_list ap)
+{
+ int count = -1;
+
+ if (size != 0)
+ count = _vsnprintf_s(outBuf, size, _TRUNCATE, format, ap);
+ if (count == -1)
+ count = _vscprintf(format, ap);
+
+ return count;
+}
+
+#endif /* _MSC_VER < 1900 */
+
#elif defined(XSLT_NEED_TRIO)
#include "trio.h"
#define vsnprintf trio_vsnprintf
diff --git a/python/tests/Makefile.am b/python/tests/Makefile.am
index f757774f..cb186745 100644
--- a/python/tests/Makefile.am
+++ b/python/tests/Makefile.am
@@ -19,10 +19,15 @@ CLEANFILES = *.pyc core
if WITH_PYTHON
tests: $(TESTSPY)
- -@(PYTHONPATH="`pwd`/..:`pwd`/../.libs:$(srcdir)/.."; \
- if test "x$(LIBXML_SRC)" != "x" ; then PYTHONPATH="$$PYTHONPATH:$(LIBXML_SRC)/python:$(LIBXML_SRC)/python/.libs"; fi; \
+ @(PYTHONPATH="`pwd`/..:`pwd`/../.libs:$(srcdir)/.."; \
+ if test "x$(LIBXML_SRC)" != "x" ; then \
+ PYTHONPATH="$$PYTHONPATH:$(LIBXML_SRC)/python:$(LIBXML_SRC)/python/.libs"; \
+ fi; \
export PYTHONPATH; \
- for test in $(TESTSPY) ; do echo "-- $$test" ; (cd $(srcdir) && $(PYTHON) $$test ); done)
+ for test in $(TESTSPY) ; do \
+ echo "-- $$test" ; \
+ (cd $(srcdir) && $(PYTHON) $$test ) || exit 1; \
+ done)
else
tests:
endif
diff --git a/python/tests/Makefile.in b/python/tests/Makefile.in
index b2f0a8f8..30d2ea21 100644
--- a/python/tests/Makefile.in
+++ b/python/tests/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.15.1 from Makefile.am.
+# Makefile.in generated by automake 1.16.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2017 Free Software Foundation, Inc.
+# Copyright (C) 1994-2018 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -148,6 +148,7 @@ EXEEXT = @EXEEXT@
EXSLT_INCLUDEDIR = @EXSLT_INCLUDEDIR@
EXSLT_LIBDIR = @EXSLT_LIBDIR@
EXSLT_LIBS = @EXSLT_LIBS@
+EXSLT_PRIVATE_LIBS = @EXSLT_PRIVATE_LIBS@
EXTRA_LIBS = @EXTRA_LIBS@
FGREP = @FGREP@
GREP = @GREP@
@@ -227,12 +228,11 @@ STRIP = @STRIP@
THREAD_LIBS = @THREAD_LIBS@
VERSION = @VERSION@
VERSION_SCRIPT_FLAGS = @VERSION_SCRIPT_FLAGS@
-WIN32_EXTRA_LDFLAGS = @WIN32_EXTRA_LDFLAGS@
-WIN32_EXTRA_LIBADD = @WIN32_EXTRA_LIBADD@
WITH_CRYPTO = @WITH_CRYPTO@
WITH_DEBUGGER = @WITH_DEBUGGER@
WITH_MEM_DEBUG = @WITH_MEM_DEBUG@
WITH_MODULES = @WITH_MODULES@
+WITH_PROFILER = @WITH_PROFILER@
WITH_TRIO = @WITH_TRIO@
WITH_XSLT_DEBUG = @WITH_XSLT_DEBUG@
XMLLINT = @XMLLINT@
@@ -242,6 +242,7 @@ XSLTPROCDV = @XSLTPROCDV@
XSLT_INCLUDEDIR = @XSLT_INCLUDEDIR@
XSLT_LIBDIR = @XSLT_LIBDIR@
XSLT_LIBS = @XSLT_LIBS@
+XSLT_PRIVATE_LIBS = @XSLT_PRIVATE_LIBS@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
@@ -331,8 +332,8 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
@@ -356,7 +357,10 @@ ctags CTAGS:
cscope cscopelist:
-distdir: $(DISTFILES)
+distdir: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) distdir-am
+
+distdir-am: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
@@ -506,10 +510,15 @@ uninstall-am:
@WITH_PYTHON_TRUE@tests: $(TESTSPY)
-@WITH_PYTHON_TRUE@ -@(PYTHONPATH="`pwd`/..:`pwd`/../.libs:$(srcdir)/.."; \
-@WITH_PYTHON_TRUE@ if test "x$(LIBXML_SRC)" != "x" ; then PYTHONPATH="$$PYTHONPATH:$(LIBXML_SRC)/python:$(LIBXML_SRC)/python/.libs"; fi; \
+@WITH_PYTHON_TRUE@ @(PYTHONPATH="`pwd`/..:`pwd`/../.libs:$(srcdir)/.."; \
+@WITH_PYTHON_TRUE@ if test "x$(LIBXML_SRC)" != "x" ; then \
+@WITH_PYTHON_TRUE@ PYTHONPATH="$$PYTHONPATH:$(LIBXML_SRC)/python:$(LIBXML_SRC)/python/.libs"; \
+@WITH_PYTHON_TRUE@ fi; \
@WITH_PYTHON_TRUE@ export PYTHONPATH; \
-@WITH_PYTHON_TRUE@ for test in $(TESTSPY) ; do echo "-- $$test" ; (cd $(srcdir) && $(PYTHON) $$test ); done)
+@WITH_PYTHON_TRUE@ for test in $(TESTSPY) ; do \
+@WITH_PYTHON_TRUE@ echo "-- $$test" ; \
+@WITH_PYTHON_TRUE@ (cd $(srcdir) && $(PYTHON) $$test ) || exit 1; \
+@WITH_PYTHON_TRUE@ done)
@WITH_PYTHON_FALSE@tests:
install-data-local:
diff --git a/python/tests/basic.py b/python/tests/basic.py
index 89a57ac1..4a60590b 100755
--- a/python/tests/basic.py
+++ b/python/tests/basic.py
@@ -27,3 +27,4 @@ if libxml2.debugMemory(1) == 0:
else:
print "Memory leak %d bytes" % (libxml2.debugMemory(1))
libxml2.dumpMemory()
+ sys.exit(255)
diff --git a/python/tests/exslt.py b/python/tests/exslt.py
index c64b2e43..c7333efb 100755
--- a/python/tests/exslt.py
+++ b/python/tests/exslt.py
@@ -54,3 +54,4 @@ if libxml2.debugMemory(1) == 0:
else:
print "Memory leak %d bytes" % (libxml2.debugMemory(1))
libxml2.dumpMemory()
+ sys.exit(255)
diff --git a/python/tests/extelem.py b/python/tests/extelem.py
index 3364d01a..16635174 100644
--- a/python/tests/extelem.py
+++ b/python/tests/extelem.py
@@ -87,3 +87,4 @@ if libxml2.debugMemory(1) == 0:
else:
print "Memory leak %d bytes" % (libxml2.debugMemory(1))
libxml2.dumpMemory()
+ sys.exit(255)
diff --git a/python/tests/extfunc.py b/python/tests/extfunc.py
index 0a559531..fc6040b3 100755
--- a/python/tests/extfunc.py
+++ b/python/tests/extfunc.py
@@ -64,3 +64,4 @@ if libxml2.debugMemory(1) == 0:
else:
print "Memory leak %d bytes" % (libxml2.debugMemory(1))
libxml2.dumpMemory()
+ sys.exit(255)