From: François Pinard Date: Thu, 28 Feb 2008 00:01:40 +0000 (-0500) Subject: Merge python/ within tests/; avoid distutils. X-Git-Tag: v3.7-beta1~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=abe2631507b2dfd73b4415fb6090881fad96d950;p=recode Merge python/ within tests/; avoid distutils. --- diff --git a/Makefile.am b/Makefile.am index c2b0723..97c0525 100644 --- a/Makefile.am +++ b/Makefile.am @@ -23,7 +23,7 @@ ACLOCAL = ./aclocal.sh @ACLOCAL@ ACLOCAL_AMFLAGS = -I m4 EXTRA_DIST = COPYING-LIB aclocal.sh m4/ChangeLog -SUBDIRS = doc lib libiconv po src tests contrib python +SUBDIRS = doc lib libiconv po src tests contrib # All object files should depend on cleaner.h as well on as config.h. # For now at least, if you modify cleaner.h.in, make twice! diff --git a/Makefile.in b/Makefile.in index 1bd8a88..dd14348 100644 --- a/Makefile.in +++ b/Makefile.in @@ -228,7 +228,7 @@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = gnits ACLOCAL_AMFLAGS = -I m4 EXTRA_DIST = COPYING-LIB aclocal.sh m4/ChangeLog -SUBDIRS = doc lib libiconv po src tests contrib python +SUBDIRS = doc lib libiconv po src tests contrib all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive diff --git a/configure b/configure index b489094..f2d07c8 100755 --- a/configure +++ b/configure @@ -23989,7 +23989,7 @@ _ACEOF -ac_config_files="$ac_config_files Makefile cleaner.h contrib/Makefile doc/Makefile lib/Makefile libiconv/Makefile po/Makefile.in python/Makefile src/Makefile tests/Makefile" +ac_config_files="$ac_config_files Makefile cleaner.h contrib/Makefile doc/Makefile lib/Makefile libiconv/Makefile po/Makefile.in src/Makefile tests/Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -24592,7 +24592,6 @@ do "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;; "libiconv/Makefile") CONFIG_FILES="$CONFIG_FILES libiconv/Makefile" ;; "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;; - "python/Makefile") CONFIG_FILES="$CONFIG_FILES python/Makefile" ;; "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;; diff --git a/configure.ac b/configure.ac index 654f4c5..4095f20 100644 --- a/configure.ac +++ b/configure.ac @@ -45,5 +45,4 @@ AH_BOTTOM([ ]) AC_OUTPUT(Makefile cleaner.h contrib/Makefile doc/Makefile lib/Makefile - libiconv/Makefile po/Makefile.in python/Makefile - src/Makefile tests/Makefile) + libiconv/Makefile po/Makefile.in src/Makefile tests/Makefile) diff --git a/python/ChangeLog b/python/ChangeLog deleted file mode 100644 index 5a46e3b..0000000 --- a/python/ChangeLog +++ /dev/null @@ -1,7 +0,0 @@ -2008-02-27 François Pinard - - * Recode.pyx: Adjusted for cleaner.h.in. - -2008-02-22 François Pinard - - * Makefile.am, Recode.pyx, setup.py: New files. diff --git a/python/Makefile.am b/python/Makefile.am deleted file mode 100644 index 3c3f23a..0000000 --- a/python/Makefile.am +++ /dev/null @@ -1,41 +0,0 @@ -# Makefile for `recode' Python interface (used for tests). -# Copyright © 2008 Free Software Foundation, Inc. -# François Pinard , 2008. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. - -AUTOMAKE_OPTIONS = gnits - -EXTRA_DIST = Recode.c Recode.pyx - -PYTHON = python - -all-local: Recode.c - -install-data-local: all-local - $(PYTHON) $(srcdir)/setup.py install --skip-build - -clean-local: - rm -f Recode.c - rm -rf build - -Recode.c: Recode.pyx - rm -f Recode.pyx - cp $(srcdir)/Recode.pyx . - $(PYTHON) $(srcdir)/setup.py build_ext \ - --include-dir=$(top_builddir):$(top_srcdir)/src \ - --libraries=recode - rm -f Recode.pyx diff --git a/python/Makefile.in b/python/Makefile.in deleted file mode 100644 index 6d404b7..0000000 --- a/python/Makefile.in +++ /dev/null @@ -1,388 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -# Makefile for `recode' Python interface (used for tests). -# Copyright © 2008 Free Software Foundation, Inc. -# François Pinard , 2008. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = python -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ChangeLog -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/codeset.m4 \ - $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/glibc21.m4 \ - $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ - $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ - $(top_srcdir)/m4/malloc.m4 $(top_srcdir)/m4/nls.m4 \ - $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ - $(top_srcdir)/m4/realloc.m4 $(top_srcdir)/m4/utimbuf.m4 \ - $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = -SOURCES = -DIST_SOURCES = -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -ALLOCA = @ALLOCA@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -ECHO = @ECHO@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ -GLIBC21 = @GLIBC21@ -GMSGFMT = @GMSGFMT@ -GMSGFMT_015 = @GMSGFMT_015@ -GREP = @GREP@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INTLLIBS = @INTLLIBS@ -INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ -LDFLAGS = @LDFLAGS@ -LEX = @LEX@ -LEXLIB = @LEXLIB@ -LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ -LIBICONV = @LIBICONV@ -LIBINTL = @LIBINTL@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LN_S = @LN_S@ -LTLIBICONV = @LTLIBICONV@ -LTLIBINTL = @LTLIBINTL@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -MSGFMT = @MSGFMT@ -MSGFMT_015 = @MSGFMT_015@ -MSGMERGE = @MSGMERGE@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -POSUB = @POSUB@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -U = @U@ -USE_NLS = @USE_NLS@ -VERSION = @VERSION@ -XGETTEXT = @XGETTEXT@ -XGETTEXT_015 = @XGETTEXT_015@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -AUTOMAKE_OPTIONS = gnits -EXTRA_DIST = Recode.c Recode.pyx -PYTHON = python -all: all-am - -.SUFFIXES: -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnits python/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnits python/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *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);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs -tags: TAGS -TAGS: - -ctags: CTAGS -CTAGS: - - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile all-local -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-local mostlyclean-am - -distclean: distclean-am - -rm -f Makefile -distclean-am: clean-am distclean-generic - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: install-data-local - -install-dvi: install-dvi-am - -install-exec-am: - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: all all-am all-local check check-am clean clean-generic \ - clean-libtool clean-local distclean distclean-generic \ - distclean-libtool distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am \ - install-data-local install-dvi install-dvi-am install-exec \ - install-exec-am install-html install-html-am install-info \ - install-info-am install-man install-pdf install-pdf-am \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am - - -all-local: Recode.c - -install-data-local: all-local - $(PYTHON) $(srcdir)/setup.py install --skip-build - -clean-local: - rm -f Recode.c - rm -rf build - -Recode.c: Recode.pyx - rm -f Recode.pyx - cp $(srcdir)/Recode.pyx . - $(PYTHON) $(srcdir)/setup.py build_ext \ - --include-dir=$(top_builddir):$(top_srcdir)/src \ - --libraries=recode - rm -f Recode.pyx -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/python/setup.py b/python/setup.py deleted file mode 100644 index eb38dd2..0000000 --- a/python/setup.py +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- - -from distutils.core import setup -from Pyrex.Distutils import build_ext, Extension - -setup(name='Recode', version='3.7', - description="Conversion between charsets, surfaces and structures.", - author='François Pinard', - author_email='pinard@iro.umontreal.ca', - url='http://recode.progiciels-bpi.ca', - ext_modules=[Extension("Recode", ["Recode.pyx"])], - cmdclass={'build_ext': build_ext}) diff --git a/tests/ChangeLog b/tests/ChangeLog index 029f43e..eb1abff 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,7 @@ +2008-02-27 François Pinard + + * Recode.pyx: Adjusted for cleaner.h.in. + 2008-02-24 François Pinard * pytest (py.test): New, including the old raises, and the new skip, @@ -31,6 +35,9 @@ * t50_methods.py: Rewrite of methods.m4. * Makefile: Adjusted. + * Recode.pyx: New file. + * Makefile: Adjusted. + 2005-03-06 François Pinard * ChangeLog: Converted to UTF-8. diff --git a/tests/Makefile.am b/tests/Makefile.am index 765f01a..76eabb9 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1,5 +1,5 @@ # Makefile for `recode' regression tests. -# Copyright © 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc. +# Copyright © 1996-2000, 2008 Free Software Foundation, Inc. # François Pinard , 1988. # This program is free software; you can redistribute it and/or modify @@ -23,10 +23,23 @@ SUITE = t21_names.py t22_lists.py t25_subsets.py t30_base64.py \ t30_dumps.py t30_quoted.py t40_african.py t40_combine.py t40_testdump.py \ t40_utf7.py t40_utf8.py t50_methods.py t90_bigauto.py -EXTRA_DIST = NOTES pytest common.py $(SUITE) +EXTRA_DIST = NOTES Recode.c Recode.pyx pytest common.py $(SUITE) PYTHON = python +all-local: Recode.so + check-local: - RECODE=../src/recode PYTHONPATH=$(srcdir) \ + RECODE=../src/recode PYTHONPATH=.:$(srcdir) \ $(PYTHON) $(srcdir)/pytest $(srcdir)/t*.py + +Recode.so: Recode.o + $(CC) -shared $< -lrecode `python-config --libs` -o $@ + +Recode.o: Recode.c + $(CC) -c -fPIC `python-config --cflags` \ + -I $(top_builddir) -I $(top_srcdir)/src $< + +Recode.c: Recode.pyx + cd $(srcdir) && pyrexc Recode.pyx + diff --git a/tests/Makefile.in b/tests/Makefile.in index a5e9433..a4e3dba 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -15,7 +15,7 @@ @SET_MAKE@ # Makefile for `recode' regression tests. -# Copyright © 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc. +# Copyright © 1996-2000, 2008 Free Software Foundation, Inc. # François Pinard , 1988. # This program is free software; you can redistribute it and/or modify @@ -201,7 +201,7 @@ SUITE = t21_names.py t22_lists.py t25_subsets.py t30_base64.py \ t30_dumps.py t30_quoted.py t40_african.py t40_combine.py t40_testdump.py \ t40_utf7.py t40_utf8.py t50_methods.py t90_bigauto.py -EXTRA_DIST = NOTES pytest common.py $(SUITE) +EXTRA_DIST = NOTES Recode.c Recode.pyx pytest common.py $(SUITE) PYTHON = python all: all-am @@ -277,7 +277,7 @@ distdir: $(DISTFILES) check-am: all-am $(MAKE) $(AM_MAKEFLAGS) check-local check: check-am -all-am: Makefile +all-am: Makefile all-local installdirs: install: install-am install-exec: install-exec-am @@ -359,10 +359,10 @@ uninstall-am: .MAKE: install-am install-strip -.PHONY: all all-am check check-am check-local clean clean-generic \ - clean-libtool distclean distclean-generic distclean-libtool \ - distdir dvi dvi-am html html-am info info-am install \ - install-am install-data install-data-am install-dvi \ +.PHONY: all all-am all-local check check-am check-local clean \ + clean-generic clean-libtool distclean distclean-generic \ + distclean-libtool distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ @@ -372,9 +372,21 @@ uninstall-am: uninstall uninstall-am +all-local: Recode.so + check-local: - RECODE=../src/recode PYTHONPATH=$(srcdir) \ + RECODE=../src/recode PYTHONPATH=.:$(srcdir) \ $(PYTHON) $(srcdir)/pytest $(srcdir)/t*.py + +Recode.so: Recode.o + $(CC) -shared $< -lrecode `python-config --libs` -o $@ + +Recode.o: Recode.c + $(CC) -c -fPIC `python-config --cflags` \ + -I $(top_builddir) -I $(top_srcdir)/src $< + +Recode.c: Recode.pyx + cd $(srcdir) && pyrexc Recode.pyx # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git a/tests/Recode.c b/tests/Recode.c new file mode 100644 index 0000000..015b5c0 --- /dev/null +++ b/tests/Recode.c @@ -0,0 +1,1739 @@ +/* Generated by Pyrex 0.9.6.4 on Wed Feb 27 18:43:50 2008 */ + +#define PY_SSIZE_T_CLEAN +#include "Python.h" +#include "structmember.h" +#ifndef PY_LONG_LONG + #define PY_LONG_LONG LONG_LONG +#endif +#if PY_VERSION_HEX < 0x02050000 + typedef int Py_ssize_t; + #define PY_SSIZE_T_MAX INT_MAX + #define PY_SSIZE_T_MIN INT_MIN + #define PyInt_FromSsize_t(z) PyInt_FromLong(z) + #define PyInt_AsSsize_t(o) PyInt_AsLong(o) +#endif +#ifndef WIN32 + #ifndef __stdcall + #define __stdcall + #endif + #ifndef __cdecl + #define __cdecl + #endif +#endif +#ifdef __cplusplus +#define __PYX_EXTERN_C extern "C" +#else +#define __PYX_EXTERN_C extern +#endif +#include +#include "stdio.h" +#include "config.h" +#include "common.h" + + +typedef struct {PyObject **p; char *s;} __Pyx_InternTabEntry; /*proto*/ +typedef struct {PyObject **p; char *s; long n;} __Pyx_StringTabEntry; /*proto*/ + +static PyObject *__pyx_m; +static PyObject *__pyx_b; +static int __pyx_lineno; +static char *__pyx_filename; +static char **__pyx_f; + +static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, char *name); /*proto*/ + +static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name); /*proto*/ + +static PyObject *__Pyx_CreateClass(PyObject *bases, PyObject *dict, PyObject *name, char *modname); /*proto*/ + +static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb); /*proto*/ + +static int __Pyx_InternStrings(__Pyx_InternTabEntry *t); /*proto*/ + +static void __Pyx_AddTraceback(char *funcname); /*proto*/ + +/* Declarations from Recode */ + +enum __pyx_t_6Recode_bool { + __pyx_e_6Recode_false = 0, + __pyx_e_6Recode_true = 1 +}; + +struct __pyx_obj_6Recode_Outer { + PyObject_HEAD + RECODE_OUTER outer; +}; + +struct __pyx_obj_6Recode_Request { + PyObject_HEAD + RECODE_REQUEST request; +}; + + + +static PyTypeObject *__pyx_ptype_6Recode_Outer = 0; +static PyTypeObject *__pyx_ptype_6Recode_Request = 0; +static PyObject *__pyx_k2; +static PyObject *__pyx_k3; + + +/* Implementation of Recode */ + + +static PyObject *__pyx_n_error; +static PyObject *__pyx_n_Exception; +static PyObject *__pyx_n_NO_SYMBOL_TYPE; +static PyObject *__pyx_n_CHARSET; +static PyObject *__pyx_n_DATA_SURFACE; +static PyObject *__pyx_n_TREE_SURFACE; +static PyObject *__pyx_n_NO_CHARSET_DATA; +static PyObject *__pyx_n_STRIP_DATA; +static PyObject *__pyx_n_EXPLODE_DATA; +static PyObject *__pyx_n_SIZE_1; +static PyObject *__pyx_n_SIZE_2; +static PyObject *__pyx_n_SIZE_4; +static PyObject *__pyx_n_SIZE_N; +static PyObject *__pyx_n_NO_STEP_TABLE; +static PyObject *__pyx_n_BYTE_TO_BYTE; +static PyObject *__pyx_n_BYTE_TO_STRING; +static PyObject *__pyx_n_UCS2_TO_BYTE; +static PyObject *__pyx_n_UCS2_TO_STRING; +static PyObject *__pyx_n_STRING_TO_UCS2; +static PyObject *__pyx_n_COMBINE_EXPLODE; +static PyObject *__pyx_n_COMBINE_STEP; +static PyObject *__pyx_n_EXPLODE_STEP; +static PyObject *__pyx_n_STRATEGY_UNDECIDED; +static PyObject *__pyx_n_SEQUENCE_IN_MEMORY; +static PyObject *__pyx_n_SEQUENCE_WITH_FILES; +static PyObject *__pyx_n_SEQUENCE_WITH_PIPE; +static PyObject *__pyx_n_SWAP_UNDECIDED; +static PyObject *__pyx_n_SWAP_NO; +static PyObject *__pyx_n_SWAP_YES; +static PyObject *__pyx_n_NO_ERROR; +static PyObject *__pyx_n_NOT_CANONICAL; +static PyObject *__pyx_n_AMBIGUOUS_OUTPUT; +static PyObject *__pyx_n_UNTRANSLATABLE; +static PyObject *__pyx_n_INVALID_INPUT; +static PyObject *__pyx_n_SYSTEM_ERROR; +static PyObject *__pyx_n_USER_ERROR; +static PyObject *__pyx_n_INTERNAL_ERROR; +static PyObject *__pyx_n_MAXIMUM_ERROR; +static PyObject *__pyx_n_NO_FORMAT; +static PyObject *__pyx_n_DECIMAL_FORMAT; +static PyObject *__pyx_n_OCTAL_FORMAT; +static PyObject *__pyx_n_HEXADECIMAL_FORMAT; +static PyObject *__pyx_n_FULL_FORMAT; +static PyObject *__pyx_n_NO_LANGUAGE; +static PyObject *__pyx_n_LANGUAGE_C; +static PyObject *__pyx_n_LANGUAGE_PERL; +static PyObject *__pyx_n_NUL; +static PyObject *__pyx_n_STRIP_SIZE; +static PyObject *__pyx_n_SYMBOL_CREATE_CHARSET; +static PyObject *__pyx_n_SYMBOL_CREATE_DATA_SURFACE; +static PyObject *__pyx_n_SYMBOL_CREATE_TREE_SURFACE; +static PyObject *__pyx_n_ALIAS_FIND_AS_CHARSET; +static PyObject *__pyx_n_ALIAS_FIND_AS_SURFACE; +static PyObject *__pyx_n_ALIAS_FIND_AS_EITHER; +static PyObject *__pyx_n_xDONE; +static PyObject *__pyx_n_xELSE; +static PyObject *__pyx_n_REPLACEMENT_CHARACTER; +static PyObject *__pyx_n_NOT_A_CHARACTER; +static PyObject *__pyx_n_BYTE_ORDER_MARK; +static PyObject *__pyx_n_BYTE_ORDER_MARK_SWAPPED; +static PyObject *__pyx_n_False; +static PyObject *__pyx_n_global_outer; + +static int __pyx_f_6Recode_5Outer___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_f_6Recode_5Outer___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_strict = 0; + int __pyx_r; + enum __pyx_t_6Recode_bool __pyx_1; + static char *__pyx_argnames[] = {"strict",0}; + __pyx_v_strict = __pyx_k2; + if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "|O", __pyx_argnames, &__pyx_v_strict)) return -1; + Py_INCREF(__pyx_v_self); + Py_INCREF(__pyx_v_strict); + __pyx_1 = ((enum __pyx_t_6Recode_bool)PyInt_AsLong(__pyx_v_strict)); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 563; goto __pyx_L1;} + ((struct __pyx_obj_6Recode_Outer *)__pyx_v_self)->outer = recode_new_outer(__pyx_1); + + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1:; + __Pyx_AddTraceback("Recode.Outer.__init__"); + __pyx_r = -1; + __pyx_L0:; + Py_DECREF(__pyx_v_self); + Py_DECREF(__pyx_v_strict); + return __pyx_r; +} + +static void __pyx_f_6Recode_5Outer___dealloc__(PyObject *__pyx_v_self); /*proto*/ +static void __pyx_f_6Recode_5Outer___dealloc__(PyObject *__pyx_v_self) { + Py_INCREF(__pyx_v_self); + recode_delete_outer(((struct __pyx_obj_6Recode_Outer *)__pyx_v_self)->outer); + + Py_DECREF(__pyx_v_self); +} + +static PyObject *__pyx_n_append; + +static PyObject *__pyx_f_6Recode_5Outer_all_charsets(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_f_6Recode_5Outer_all_charsets(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_list; + RECODE_SYMBOL __pyx_v_symbol; + PyObject *__pyx_r; + PyObject *__pyx_1 = 0; + int __pyx_2; + PyObject *__pyx_3 = 0; + PyObject *__pyx_4 = 0; + static char *__pyx_argnames[] = {0}; + if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; + Py_INCREF(__pyx_v_self); + __pyx_v_list = Py_None; Py_INCREF(Py_None); + + /* "/bpi/phenix/home/pinard/entretien/recode/tests/Recode.pyx":569 */ + __pyx_1 = PyList_New(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 569; goto __pyx_L1;} + Py_DECREF(__pyx_v_list); + __pyx_v_list = __pyx_1; + __pyx_1 = 0; + + /* "/bpi/phenix/home/pinard/entretien/recode/tests/Recode.pyx":571 */ + __pyx_v_symbol = ((struct __pyx_obj_6Recode_Outer *)__pyx_v_self)->outer->symbol_list; + + /* "/bpi/phenix/home/pinard/entretien/recode/tests/Recode.pyx":572 */ + while (1) { + __pyx_2 = (__pyx_v_symbol != NULL); + if (!__pyx_2) break; + + /* "/bpi/phenix/home/pinard/entretien/recode/tests/Recode.pyx":573 */ + __pyx_2 = (__pyx_v_symbol->type == RECODE_CHARSET); + if (__pyx_2) { + __pyx_2 = (__pyx_v_symbol != ((struct __pyx_obj_6Recode_Outer *)__pyx_v_self)->outer->libiconv_pivot); + if (__pyx_2) { + __pyx_2 = (__pyx_v_symbol != ((struct __pyx_obj_6Recode_Outer *)__pyx_v_self)->outer->data_symbol); + if (__pyx_2) { + __pyx_2 = (__pyx_v_symbol != ((struct __pyx_obj_6Recode_Outer *)__pyx_v_self)->outer->tree_symbol); + } + } + } + if (__pyx_2) { + __pyx_1 = PyObject_GetAttr(__pyx_v_list, __pyx_n_append); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 577; goto __pyx_L1;} + __pyx_3 = PyString_FromString(__pyx_v_symbol->name); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 577; goto __pyx_L1;} + __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 577; goto __pyx_L1;} + PyTuple_SET_ITEM(__pyx_4, 0, __pyx_3); + __pyx_3 = 0; + __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_4); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 577; goto __pyx_L1;} + Py_DECREF(__pyx_1); __pyx_1 = 0; + Py_DECREF(__pyx_4); __pyx_4 = 0; + Py_DECREF(__pyx_3); __pyx_3 = 0; + goto __pyx_L4; + } + __pyx_L4:; + + /* "/bpi/phenix/home/pinard/entretien/recode/tests/Recode.pyx":578 */ + __pyx_v_symbol = __pyx_v_symbol->next; + } + + /* "/bpi/phenix/home/pinard/entretien/recode/tests/Recode.pyx":579 */ + Py_INCREF(__pyx_v_list); + __pyx_r = __pyx_v_list; + goto __pyx_L0; + + __pyx_r = Py_None; Py_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1:; + Py_XDECREF(__pyx_1); + Py_XDECREF(__pyx_3); + Py_XDECREF(__pyx_4); + __Pyx_AddTraceback("Recode.Outer.all_charsets"); + __pyx_r = 0; + __pyx_L0:; + Py_DECREF(__pyx_v_list); + Py_DECREF(__pyx_v_self); + return __pyx_r; +} + +static PyObject *__pyx_f_6Recode_5Outer_all_surfaces(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_f_6Recode_5Outer_all_surfaces(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_list; + RECODE_SYMBOL __pyx_v_symbol; + PyObject *__pyx_r; + PyObject *__pyx_1 = 0; + int __pyx_2; + PyObject *__pyx_3 = 0; + PyObject *__pyx_4 = 0; + static char *__pyx_argnames[] = {0}; + if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; + Py_INCREF(__pyx_v_self); + __pyx_v_list = Py_None; Py_INCREF(Py_None); + + /* "/bpi/phenix/home/pinard/entretien/recode/tests/Recode.pyx":582 */ + __pyx_1 = PyList_New(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 582; goto __pyx_L1;} + Py_DECREF(__pyx_v_list); + __pyx_v_list = __pyx_1; + __pyx_1 = 0; + + /* "/bpi/phenix/home/pinard/entretien/recode/tests/Recode.pyx":584 */ + __pyx_v_symbol = ((struct __pyx_obj_6Recode_Outer *)__pyx_v_self)->outer->symbol_list; + + /* "/bpi/phenix/home/pinard/entretien/recode/tests/Recode.pyx":585 */ + while (1) { + __pyx_2 = (__pyx_v_symbol != NULL); + if (!__pyx_2) break; + + /* "/bpi/phenix/home/pinard/entretien/recode/tests/Recode.pyx":586 */ + __pyx_2 = (__pyx_v_symbol->type != RECODE_CHARSET); + if (__pyx_2) { + __pyx_1 = PyObject_GetAttr(__pyx_v_list, __pyx_n_append); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 587; goto __pyx_L1;} + __pyx_3 = PyString_FromString(__pyx_v_symbol->name); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 587; goto __pyx_L1;} + __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 587; goto __pyx_L1;} + PyTuple_SET_ITEM(__pyx_4, 0, __pyx_3); + __pyx_3 = 0; + __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_4); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 587; goto __pyx_L1;} + Py_DECREF(__pyx_1); __pyx_1 = 0; + Py_DECREF(__pyx_4); __pyx_4 = 0; + Py_DECREF(__pyx_3); __pyx_3 = 0; + goto __pyx_L4; + } + __pyx_L4:; + + /* "/bpi/phenix/home/pinard/entretien/recode/tests/Recode.pyx":588 */ + __pyx_v_symbol = __pyx_v_symbol->next; + } + + /* "/bpi/phenix/home/pinard/entretien/recode/tests/Recode.pyx":589 */ + Py_INCREF(__pyx_v_list); + __pyx_r = __pyx_v_list; + goto __pyx_L0; + + __pyx_r = Py_None; Py_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1:; + Py_XDECREF(__pyx_1); + Py_XDECREF(__pyx_3); + Py_XDECREF(__pyx_4); + __Pyx_AddTraceback("Recode.Outer.all_surfaces"); + __pyx_r = 0; + __pyx_L0:; + Py_DECREF(__pyx_v_list); + Py_DECREF(__pyx_v_self); + return __pyx_r; +} + +static PyObject *__pyx_f_6Recode_5Outer_concise_charset(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_f_6Recode_5Outer_concise_charset(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_format = 0; + PyObject *__pyx_v_ok; + PyObject *__pyx_r; + enum recode_list_format __pyx_1; + PyObject *__pyx_2 = 0; + int __pyx_3; + int __pyx_4; + static char *__pyx_argnames[] = {"format",0}; + __pyx_v_format = __pyx_k3; + if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "|O", __pyx_argnames, &__pyx_v_format)) return 0; + Py_INCREF(__pyx_v_self); + Py_INCREF(__pyx_v_format); + __pyx_v_ok = Py_None; Py_INCREF(Py_None); + + /* "/bpi/phenix/home/pinard/entretien/recode/tests/Recode.pyx":592 */ + __pyx_1 = ((enum recode_list_format)PyInt_AsLong(__pyx_v_format)); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 592; goto __pyx_L1;} + __pyx_2 = PyInt_FromLong(librecode_list_concise_charset(((struct __pyx_obj_6Recode_Outer *)__pyx_v_self)->outer,NULL,__pyx_1)); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 592; goto __pyx_L1;} + Py_DECREF(__pyx_v_ok); + __pyx_v_ok = __pyx_2; + __pyx_2 = 0; + + /* "/bpi/phenix/home/pinard/entretien/recode/tests/Recode.pyx":593 */ + __pyx_3 = PyObject_IsTrue(__pyx_v_ok); if (__pyx_3 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 593; goto __pyx_L1;} + __pyx_4 = (!__pyx_3); + if (__pyx_4) { + __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_error); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; goto __pyx_L1;} + __Pyx_Raise(__pyx_2, 0, 0); + Py_DECREF(__pyx_2); __pyx_2 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; goto __pyx_L1;} + goto __pyx_L2; + } + __pyx_L2:; + + __pyx_r = Py_None; Py_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1:; + Py_XDECREF(__pyx_2); + __Pyx_AddTraceback("Recode.Outer.concise_charset"); + __pyx_r = 0; + __pyx_L0:; + Py_DECREF(__pyx_v_ok); + Py_DECREF(__pyx_v_self); + Py_DECREF(__pyx_v_format); + return __pyx_r; +} + +static PyObject *__pyx_f_6Recode_5Outer_full_charset(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_f_6Recode_5Outer_full_charset(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_ok; + PyObject *__pyx_r; + PyObject *__pyx_1 = 0; + int __pyx_2; + int __pyx_3; + static char *__pyx_argnames[] = {0}; + if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; + Py_INCREF(__pyx_v_self); + __pyx_v_ok = Py_None; Py_INCREF(Py_None); + + /* "/bpi/phenix/home/pinard/entretien/recode/tests/Recode.pyx":597 */ + __pyx_1 = PyInt_FromLong(librecode_list_full_charset(((struct __pyx_obj_6Recode_Outer *)__pyx_v_self)->outer,NULL)); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 597; goto __pyx_L1;} + Py_DECREF(__pyx_v_ok); + __pyx_v_ok = __pyx_1; + __pyx_1 = 0; + + /* "/bpi/phenix/home/pinard/entretien/recode/tests/Recode.pyx":598 */ + __pyx_2 = PyObject_IsTrue(__pyx_v_ok); if (__pyx_2 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 598; goto __pyx_L1;} + __pyx_3 = (!__pyx_2); + if (__pyx_3) { + __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_error); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 599; goto __pyx_L1;} + __Pyx_Raise(__pyx_1, 0, 0); + Py_DECREF(__pyx_1); __pyx_1 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 599; goto __pyx_L1;} + goto __pyx_L2; + } + __pyx_L2:; + + __pyx_r = Py_None; Py_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1:; + Py_XDECREF(__pyx_1); + __Pyx_AddTraceback("Recode.Outer.full_charset"); + __pyx_r = 0; + __pyx_L0:; + Py_DECREF(__pyx_v_ok); + Py_DECREF(__pyx_v_self); + return __pyx_r; +} + +static PyObject *__pyx_n_int; + +static PyObject *__pyx_f_6Recode_5Outer_set_libiconv(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_f_6Recode_5Outer_set_libiconv(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_flag = 0; + PyObject *__pyx_v_previous; + PyObject *__pyx_r; + PyObject *__pyx_1 = 0; + int __pyx_2; + PyObject *__pyx_3 = 0; + PyObject *__pyx_4 = 0; + enum __pyx_t_6Recode_bool __pyx_5; + static char *__pyx_argnames[] = {"flag",0}; + if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_flag)) return 0; + Py_INCREF(__pyx_v_self); + Py_INCREF(__pyx_v_flag); + __pyx_v_previous = Py_None; Py_INCREF(Py_None); + + /* "/bpi/phenix/home/pinard/entretien/recode/tests/Recode.pyx":602 */ + __pyx_1 = PyInt_FromLong((((struct __pyx_obj_6Recode_Outer *)__pyx_v_self)->outer->libiconv_pivot->ignore == 0)); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 602; goto __pyx_L1;} + Py_DECREF(__pyx_v_previous); + __pyx_v_previous = __pyx_1; + __pyx_1 = 0; + + /* "/bpi/phenix/home/pinard/entretien/recode/tests/Recode.pyx":603 */ + __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_int); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; goto __pyx_L1;} + __pyx_2 = PyObject_IsTrue(__pyx_v_flag); if (__pyx_2 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; goto __pyx_L1;} + __pyx_3 = PyInt_FromLong((!__pyx_2)); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; goto __pyx_L1;} + __pyx_4 = PyTuple_New(1); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; goto __pyx_L1;} + PyTuple_SET_ITEM(__pyx_4, 0, __pyx_3); + __pyx_3 = 0; + __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_4); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; goto __pyx_L1;} + Py_DECREF(__pyx_1); __pyx_1 = 0; + Py_DECREF(__pyx_4); __pyx_4 = 0; + __pyx_5 = ((enum __pyx_t_6Recode_bool)PyInt_AsLong(__pyx_3)); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; goto __pyx_L1;} + Py_DECREF(__pyx_3); __pyx_3 = 0; + ((struct __pyx_obj_6Recode_Outer *)__pyx_v_self)->outer->libiconv_pivot->ignore = __pyx_5; + + /* "/bpi/phenix/home/pinard/entretien/recode/tests/Recode.pyx":604 */ + Py_INCREF(__pyx_v_previous); + __pyx_r = __pyx_v_previous; + goto __pyx_L0; + + __pyx_r = Py_None; Py_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1:; + Py_XDECREF(__pyx_1); + Py_XDECREF(__pyx_3); + Py_XDECREF(__pyx_4); + __Pyx_AddTraceback("Recode.Outer.set_libiconv"); + __pyx_r = 0; + __pyx_L0:; + Py_DECREF(__pyx_v_previous); + Py_DECREF(__pyx_v_self); + Py_DECREF(__pyx_v_flag); + return __pyx_r; +} + +static int __pyx_f_6Recode_7Request___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_f_6Recode_7Request___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + struct __pyx_obj_6Recode_Outer *__pyx_v_outer = 0; + int __pyx_r; + static char *__pyx_argnames[] = {"outer",0}; + if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_outer)) return -1; + Py_INCREF(__pyx_v_self); + Py_INCREF(__pyx_v_outer); + if (!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_outer), __pyx_ptype_6Recode_Outer, 1, "outer")) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 611; goto __pyx_L1;} + ((struct __pyx_obj_6Recode_Request *)__pyx_v_self)->request = recode_new_request(__pyx_v_outer->outer); + + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1:; + __Pyx_AddTraceback("Recode.Request.__init__"); + __pyx_r = -1; + __pyx_L0:; + Py_DECREF(__pyx_v_self); + Py_DECREF(__pyx_v_outer); + return __pyx_r; +} + +static void __pyx_f_6Recode_7Request___dealloc__(PyObject *__pyx_v_self); /*proto*/ +static void __pyx_f_6Recode_7Request___dealloc__(PyObject *__pyx_v_self) { + Py_INCREF(__pyx_v_self); + recode_delete_request(((struct __pyx_obj_6Recode_Request *)__pyx_v_self)->request); + + Py_DECREF(__pyx_v_self); +} + +static PyObject *__pyx_f_6Recode_7Request_set_verbose(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_f_6Recode_7Request_set_verbose(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_flag = 0; + PyObject *__pyx_v_previous; + PyObject *__pyx_r; + PyObject *__pyx_1 = 0; + PyObject *__pyx_2 = 0; + PyObject *__pyx_3 = 0; + enum __pyx_t_6Recode_bool __pyx_4; + static char *__pyx_argnames[] = {"flag",0}; + if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "O", __pyx_argnames, &__pyx_v_flag)) return 0; + Py_INCREF(__pyx_v_self); + Py_INCREF(__pyx_v_flag); + __pyx_v_previous = Py_None; Py_INCREF(Py_None); + + /* "/bpi/phenix/home/pinard/entretien/recode/tests/Recode.pyx":618 */ + __pyx_1 = PyInt_FromLong((((struct __pyx_obj_6Recode_Request *)__pyx_v_self)->request->verbose_flag != 0)); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 618; goto __pyx_L1;} + Py_DECREF(__pyx_v_previous); + __pyx_v_previous = __pyx_1; + __pyx_1 = 0; + + /* "/bpi/phenix/home/pinard/entretien/recode/tests/Recode.pyx":619 */ + __pyx_1 = __Pyx_GetName(__pyx_b, __pyx_n_int); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 619; goto __pyx_L1;} + __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 619; goto __pyx_L1;} + Py_INCREF(__pyx_v_flag); + PyTuple_SET_ITEM(__pyx_2, 0, __pyx_v_flag); + __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 619; goto __pyx_L1;} + Py_DECREF(__pyx_1); __pyx_1 = 0; + Py_DECREF(__pyx_2); __pyx_2 = 0; + __pyx_4 = ((enum __pyx_t_6Recode_bool)PyInt_AsLong(__pyx_3)); if (PyErr_Occurred()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 619; goto __pyx_L1;} + Py_DECREF(__pyx_3); __pyx_3 = 0; + ((struct __pyx_obj_6Recode_Request *)__pyx_v_self)->request->verbose_flag = __pyx_4; + + /* "/bpi/phenix/home/pinard/entretien/recode/tests/Recode.pyx":620 */ + Py_INCREF(__pyx_v_previous); + __pyx_r = __pyx_v_previous; + goto __pyx_L0; + + __pyx_r = Py_None; Py_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1:; + Py_XDECREF(__pyx_1); + Py_XDECREF(__pyx_2); + Py_XDECREF(__pyx_3); + __Pyx_AddTraceback("Recode.Request.set_verbose"); + __pyx_r = 0; + __pyx_L0:; + Py_DECREF(__pyx_v_previous); + Py_DECREF(__pyx_v_self); + Py_DECREF(__pyx_v_flag); + return __pyx_r; +} + +static PyObject *__pyx_f_6Recode_7Request_scan(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_f_6Recode_7Request_scan(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + char *__pyx_v_text; + PyObject *__pyx_v_ok; + PyObject *__pyx_r; + PyObject *__pyx_1 = 0; + int __pyx_2; + int __pyx_3; + static char *__pyx_argnames[] = {"text",0}; + if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "s", __pyx_argnames, &__pyx_v_text)) return 0; + Py_INCREF(__pyx_v_self); + __pyx_v_ok = Py_None; Py_INCREF(Py_None); + + /* "/bpi/phenix/home/pinard/entretien/recode/tests/Recode.pyx":623 */ + __pyx_1 = PyInt_FromLong(recode_scan_request(((struct __pyx_obj_6Recode_Request *)__pyx_v_self)->request,__pyx_v_text)); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 623; goto __pyx_L1;} + Py_DECREF(__pyx_v_ok); + __pyx_v_ok = __pyx_1; + __pyx_1 = 0; + + /* "/bpi/phenix/home/pinard/entretien/recode/tests/Recode.pyx":624 */ + __pyx_2 = PyObject_IsTrue(__pyx_v_ok); if (__pyx_2 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 624; goto __pyx_L1;} + __pyx_3 = (!__pyx_2); + if (__pyx_3) { + __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_error); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 625; goto __pyx_L1;} + __Pyx_Raise(__pyx_1, 0, 0); + Py_DECREF(__pyx_1); __pyx_1 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 625; goto __pyx_L1;} + goto __pyx_L2; + } + __pyx_L2:; + + __pyx_r = Py_None; Py_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1:; + Py_XDECREF(__pyx_1); + __Pyx_AddTraceback("Recode.Request.scan"); + __pyx_r = 0; + __pyx_L0:; + Py_DECREF(__pyx_v_ok); + Py_DECREF(__pyx_v_self); + return __pyx_r; +} + +static PyObject *__pyx_f_6Recode_7Request_pair_sequence(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_f_6Recode_7Request_pair_sequence(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_list; + struct recode_step __pyx_v_step; + unsigned int __pyx_v_counter; + PyObject *__pyx_r; + PyObject *__pyx_1 = 0; + short __pyx_2; + PyObject *__pyx_3 = 0; + PyObject *__pyx_4 = 0; + PyObject *__pyx_5 = 0; + static char *__pyx_argnames[] = {0}; + if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0; + Py_INCREF(__pyx_v_self); + __pyx_v_list = Py_None; Py_INCREF(Py_None); + + /* "/bpi/phenix/home/pinard/entretien/recode/tests/Recode.pyx":628 */ + __pyx_1 = PyList_New(0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 628; goto __pyx_L1;} + Py_DECREF(__pyx_v_list); + __pyx_v_list = __pyx_1; + __pyx_1 = 0; + + /* "/bpi/phenix/home/pinard/entretien/recode/tests/Recode.pyx":631 */ + __pyx_2 = ((struct __pyx_obj_6Recode_Request *)__pyx_v_self)->request->sequence_length; + for (__pyx_v_counter = 0; __pyx_v_counter < __pyx_2; ++__pyx_v_counter) { + + /* "/bpi/phenix/home/pinard/entretien/recode/tests/Recode.pyx":632 */ + __pyx_v_step = (((struct __pyx_obj_6Recode_Request *)__pyx_v_self)->request->sequence_array[__pyx_v_counter]); + + /* "/bpi/phenix/home/pinard/entretien/recode/tests/Recode.pyx":633 */ + __pyx_1 = PyObject_GetAttr(__pyx_v_list, __pyx_n_append); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 633; goto __pyx_L1;} + __pyx_3 = PyString_FromString(__pyx_v_step.before->name); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 633; goto __pyx_L1;} + __pyx_4 = PyString_FromString(__pyx_v_step.after->name); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 633; goto __pyx_L1;} + __pyx_5 = PyTuple_New(2); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 633; goto __pyx_L1;} + PyTuple_SET_ITEM(__pyx_5, 0, __pyx_3); + PyTuple_SET_ITEM(__pyx_5, 1, __pyx_4); + __pyx_3 = 0; + __pyx_4 = 0; + __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 633; goto __pyx_L1;} + PyTuple_SET_ITEM(__pyx_3, 0, __pyx_5); + __pyx_5 = 0; + __pyx_4 = PyObject_CallObject(__pyx_1, __pyx_3); if (!__pyx_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 633; goto __pyx_L1;} + Py_DECREF(__pyx_1); __pyx_1 = 0; + Py_DECREF(__pyx_3); __pyx_3 = 0; + Py_DECREF(__pyx_4); __pyx_4 = 0; + } + + /* "/bpi/phenix/home/pinard/entretien/recode/tests/Recode.pyx":634 */ + Py_INCREF(__pyx_v_list); + __pyx_r = __pyx_v_list; + goto __pyx_L0; + + __pyx_r = Py_None; Py_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1:; + Py_XDECREF(__pyx_1); + Py_XDECREF(__pyx_3); + Py_XDECREF(__pyx_4); + Py_XDECREF(__pyx_5); + __Pyx_AddTraceback("Recode.Request.pair_sequence"); + __pyx_r = 0; + __pyx_L0:; + Py_DECREF(__pyx_v_list); + Py_DECREF(__pyx_v_self); + return __pyx_r; +} + +static PyObject *__pyx_f_6Recode_7Request_format_table(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_f_6Recode_7Request_format_table(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + int __pyx_v_language; + char *__pyx_v_charset; + RECODE_OUTER __pyx_v_outer; + enum __pyx_t_6Recode_bool __pyx_v_saved; + PyObject *__pyx_v_ok; + PyObject *__pyx_r; + PyObject *__pyx_1 = 0; + int __pyx_2; + int __pyx_3; + static char *__pyx_argnames[] = {"language","charset",0}; + if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "is", __pyx_argnames, &__pyx_v_language, &__pyx_v_charset)) return 0; + Py_INCREF(__pyx_v_self); + __pyx_v_ok = Py_None; Py_INCREF(Py_None); + + /* "/bpi/phenix/home/pinard/entretien/recode/tests/Recode.pyx":639 */ + __pyx_v_outer = ((struct __pyx_obj_6Recode_Request *)__pyx_v_self)->request->outer; + + /* "/bpi/phenix/home/pinard/entretien/recode/tests/Recode.pyx":640 */ + __pyx_v_saved = __pyx_v_outer->libiconv_pivot->ignore; + + /* "/bpi/phenix/home/pinard/entretien/recode/tests/Recode.pyx":641 */ + __pyx_v_outer->libiconv_pivot->ignore = __pyx_e_6Recode_true; + + /* "/bpi/phenix/home/pinard/entretien/recode/tests/Recode.pyx":642 */ + __pyx_1 = PyInt_FromLong(recode_format_table(((struct __pyx_obj_6Recode_Request *)__pyx_v_self)->request,((enum recode_programming_language)__pyx_v_language),__pyx_v_charset)); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 642; goto __pyx_L1;} + Py_DECREF(__pyx_v_ok); + __pyx_v_ok = __pyx_1; + __pyx_1 = 0; + + /* "/bpi/phenix/home/pinard/entretien/recode/tests/Recode.pyx":644 */ + __pyx_v_outer->libiconv_pivot->ignore = __pyx_v_saved; + + /* "/bpi/phenix/home/pinard/entretien/recode/tests/Recode.pyx":645 */ + __pyx_2 = PyObject_IsTrue(__pyx_v_ok); if (__pyx_2 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 645; goto __pyx_L1;} + __pyx_3 = (!__pyx_2); + if (__pyx_3) { + __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_error); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 646; goto __pyx_L1;} + __Pyx_Raise(__pyx_1, 0, 0); + Py_DECREF(__pyx_1); __pyx_1 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 646; goto __pyx_L1;} + goto __pyx_L2; + } + __pyx_L2:; + + __pyx_r = Py_None; Py_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1:; + Py_XDECREF(__pyx_1); + __Pyx_AddTraceback("Recode.Request.format_table"); + __pyx_r = 0; + __pyx_L0:; + Py_DECREF(__pyx_v_ok); + Py_DECREF(__pyx_v_self); + return __pyx_r; +} + +static PyObject *__pyx_f_6Recode_7Request_string(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_f_6Recode_7Request_string(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + char *__pyx_v_text; + char *__pyx_v_result; + PyObject *__pyx_r; + int __pyx_1; + PyObject *__pyx_2 = 0; + static char *__pyx_argnames[] = {"text",0}; + if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "s", __pyx_argnames, &__pyx_v_text)) return 0; + Py_INCREF(__pyx_v_self); + + /* "/bpi/phenix/home/pinard/entretien/recode/tests/Recode.pyx":650 */ + __pyx_v_result = recode_string(((struct __pyx_obj_6Recode_Request *)__pyx_v_self)->request,__pyx_v_text); + + /* "/bpi/phenix/home/pinard/entretien/recode/tests/Recode.pyx":651 */ + __pyx_1 = (__pyx_v_result == NULL); + if (__pyx_1) { + __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_n_error); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 652; goto __pyx_L1;} + __Pyx_Raise(__pyx_2, 0, 0); + Py_DECREF(__pyx_2); __pyx_2 = 0; + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 652; goto __pyx_L1;} + goto __pyx_L2; + } + __pyx_L2:; + + /* "/bpi/phenix/home/pinard/entretien/recode/tests/Recode.pyx":653 */ + __pyx_2 = PyString_FromString(__pyx_v_result); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 653; goto __pyx_L1;} + __pyx_r = __pyx_2; + __pyx_2 = 0; + goto __pyx_L0; + + __pyx_r = Py_None; Py_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1:; + Py_XDECREF(__pyx_2); + __Pyx_AddTraceback("Recode.Request.string"); + __pyx_r = 0; + __pyx_L0:; + Py_DECREF(__pyx_v_self); + return __pyx_r; +} + +static PyObject *__pyx_n_scan; +static PyObject *__pyx_n_string; + +static PyObject *__pyx_f_6Recode_recode(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_f_6Recode_recode(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + char *__pyx_v_text; + char *__pyx_v_string; + PyObject *__pyx_v_request; + PyObject *__pyx_r; + PyObject *__pyx_1 = 0; + PyObject *__pyx_2 = 0; + PyObject *__pyx_3 = 0; + static char *__pyx_argnames[] = {"text","string",0}; + if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "ss", __pyx_argnames, &__pyx_v_text, &__pyx_v_string)) return 0; + __pyx_v_request = Py_None; Py_INCREF(Py_None); + + /* "/bpi/phenix/home/pinard/entretien/recode/tests/Recode.pyx":672 */ + __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_global_outer); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 672; goto __pyx_L1;} + __pyx_2 = PyTuple_New(1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 672; goto __pyx_L1;} + PyTuple_SET_ITEM(__pyx_2, 0, __pyx_1); + __pyx_1 = 0; + __pyx_1 = PyObject_CallObject(((PyObject*)__pyx_ptype_6Recode_Request), __pyx_2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 672; goto __pyx_L1;} + Py_DECREF(__pyx_2); __pyx_2 = 0; + Py_DECREF(__pyx_v_request); + __pyx_v_request = __pyx_1; + __pyx_1 = 0; + + /* "/bpi/phenix/home/pinard/entretien/recode/tests/Recode.pyx":673 */ + __pyx_2 = PyObject_GetAttr(__pyx_v_request, __pyx_n_scan); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 673; goto __pyx_L1;} + __pyx_1 = PyString_FromString(__pyx_v_text); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 673; goto __pyx_L1;} + __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 673; goto __pyx_L1;} + PyTuple_SET_ITEM(__pyx_3, 0, __pyx_1); + __pyx_1 = 0; + __pyx_1 = PyObject_CallObject(__pyx_2, __pyx_3); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 673; goto __pyx_L1;} + Py_DECREF(__pyx_2); __pyx_2 = 0; + Py_DECREF(__pyx_3); __pyx_3 = 0; + Py_DECREF(__pyx_1); __pyx_1 = 0; + + /* "/bpi/phenix/home/pinard/entretien/recode/tests/Recode.pyx":674 */ + __pyx_2 = PyObject_GetAttr(__pyx_v_request, __pyx_n_string); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 674; goto __pyx_L1;} + __pyx_3 = PyString_FromString(__pyx_v_string); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 674; goto __pyx_L1;} + __pyx_1 = PyTuple_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 674; goto __pyx_L1;} + PyTuple_SET_ITEM(__pyx_1, 0, __pyx_3); + __pyx_3 = 0; + __pyx_3 = PyObject_CallObject(__pyx_2, __pyx_1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 674; goto __pyx_L1;} + Py_DECREF(__pyx_2); __pyx_2 = 0; + Py_DECREF(__pyx_1); __pyx_1 = 0; + __pyx_r = __pyx_3; + __pyx_3 = 0; + goto __pyx_L0; + + __pyx_r = Py_None; Py_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1:; + Py_XDECREF(__pyx_1); + Py_XDECREF(__pyx_2); + Py_XDECREF(__pyx_3); + __Pyx_AddTraceback("Recode.recode"); + __pyx_r = 0; + __pyx_L0:; + Py_DECREF(__pyx_v_request); + return __pyx_r; +} + +static __Pyx_InternTabEntry __pyx_intern_tab[] = { + {&__pyx_n_ALIAS_FIND_AS_CHARSET, "ALIAS_FIND_AS_CHARSET"}, + {&__pyx_n_ALIAS_FIND_AS_EITHER, "ALIAS_FIND_AS_EITHER"}, + {&__pyx_n_ALIAS_FIND_AS_SURFACE, "ALIAS_FIND_AS_SURFACE"}, + {&__pyx_n_AMBIGUOUS_OUTPUT, "AMBIGUOUS_OUTPUT"}, + {&__pyx_n_BYTE_ORDER_MARK, "BYTE_ORDER_MARK"}, + {&__pyx_n_BYTE_ORDER_MARK_SWAPPED, "BYTE_ORDER_MARK_SWAPPED"}, + {&__pyx_n_BYTE_TO_BYTE, "BYTE_TO_BYTE"}, + {&__pyx_n_BYTE_TO_STRING, "BYTE_TO_STRING"}, + {&__pyx_n_CHARSET, "CHARSET"}, + {&__pyx_n_COMBINE_EXPLODE, "COMBINE_EXPLODE"}, + {&__pyx_n_COMBINE_STEP, "COMBINE_STEP"}, + {&__pyx_n_DATA_SURFACE, "DATA_SURFACE"}, + {&__pyx_n_DECIMAL_FORMAT, "DECIMAL_FORMAT"}, + {&__pyx_n_EXPLODE_DATA, "EXPLODE_DATA"}, + {&__pyx_n_EXPLODE_STEP, "EXPLODE_STEP"}, + {&__pyx_n_Exception, "Exception"}, + {&__pyx_n_FULL_FORMAT, "FULL_FORMAT"}, + {&__pyx_n_False, "False"}, + {&__pyx_n_HEXADECIMAL_FORMAT, "HEXADECIMAL_FORMAT"}, + {&__pyx_n_INTERNAL_ERROR, "INTERNAL_ERROR"}, + {&__pyx_n_INVALID_INPUT, "INVALID_INPUT"}, + {&__pyx_n_LANGUAGE_C, "LANGUAGE_C"}, + {&__pyx_n_LANGUAGE_PERL, "LANGUAGE_PERL"}, + {&__pyx_n_MAXIMUM_ERROR, "MAXIMUM_ERROR"}, + {&__pyx_n_NOT_A_CHARACTER, "NOT_A_CHARACTER"}, + {&__pyx_n_NOT_CANONICAL, "NOT_CANONICAL"}, + {&__pyx_n_NO_CHARSET_DATA, "NO_CHARSET_DATA"}, + {&__pyx_n_NO_ERROR, "NO_ERROR"}, + {&__pyx_n_NO_FORMAT, "NO_FORMAT"}, + {&__pyx_n_NO_LANGUAGE, "NO_LANGUAGE"}, + {&__pyx_n_NO_STEP_TABLE, "NO_STEP_TABLE"}, + {&__pyx_n_NO_SYMBOL_TYPE, "NO_SYMBOL_TYPE"}, + {&__pyx_n_NUL, "NUL"}, + {&__pyx_n_OCTAL_FORMAT, "OCTAL_FORMAT"}, + {&__pyx_n_REPLACEMENT_CHARACTER, "REPLACEMENT_CHARACTER"}, + {&__pyx_n_SEQUENCE_IN_MEMORY, "SEQUENCE_IN_MEMORY"}, + {&__pyx_n_SEQUENCE_WITH_FILES, "SEQUENCE_WITH_FILES"}, + {&__pyx_n_SEQUENCE_WITH_PIPE, "SEQUENCE_WITH_PIPE"}, + {&__pyx_n_SIZE_1, "SIZE_1"}, + {&__pyx_n_SIZE_2, "SIZE_2"}, + {&__pyx_n_SIZE_4, "SIZE_4"}, + {&__pyx_n_SIZE_N, "SIZE_N"}, + {&__pyx_n_STRATEGY_UNDECIDED, "STRATEGY_UNDECIDED"}, + {&__pyx_n_STRING_TO_UCS2, "STRING_TO_UCS2"}, + {&__pyx_n_STRIP_DATA, "STRIP_DATA"}, + {&__pyx_n_STRIP_SIZE, "STRIP_SIZE"}, + {&__pyx_n_SWAP_NO, "SWAP_NO"}, + {&__pyx_n_SWAP_UNDECIDED, "SWAP_UNDECIDED"}, + {&__pyx_n_SWAP_YES, "SWAP_YES"}, + {&__pyx_n_SYMBOL_CREATE_CHARSET, "SYMBOL_CREATE_CHARSET"}, + {&__pyx_n_SYMBOL_CREATE_DATA_SURFACE, "SYMBOL_CREATE_DATA_SURFACE"}, + {&__pyx_n_SYMBOL_CREATE_TREE_SURFACE, "SYMBOL_CREATE_TREE_SURFACE"}, + {&__pyx_n_SYSTEM_ERROR, "SYSTEM_ERROR"}, + {&__pyx_n_TREE_SURFACE, "TREE_SURFACE"}, + {&__pyx_n_UCS2_TO_BYTE, "UCS2_TO_BYTE"}, + {&__pyx_n_UCS2_TO_STRING, "UCS2_TO_STRING"}, + {&__pyx_n_UNTRANSLATABLE, "UNTRANSLATABLE"}, + {&__pyx_n_USER_ERROR, "USER_ERROR"}, + {&__pyx_n_append, "append"}, + {&__pyx_n_error, "error"}, + {&__pyx_n_global_outer, "global_outer"}, + {&__pyx_n_int, "int"}, + {&__pyx_n_scan, "scan"}, + {&__pyx_n_string, "string"}, + {&__pyx_n_xDONE, "xDONE"}, + {&__pyx_n_xELSE, "xELSE"}, + {0, 0} +}; + +static PyObject *__pyx_tp_new_6Recode_Outer(PyTypeObject *t, PyObject *a, PyObject *k) { + PyObject *o = (*t->tp_alloc)(t, 0); + if (!o) return 0; + return o; +} + +static void __pyx_tp_dealloc_6Recode_Outer(PyObject *o) { + { + PyObject *etype, *eval, *etb; + PyErr_Fetch(&etype, &eval, &etb); + ++o->ob_refcnt; + __pyx_f_6Recode_5Outer___dealloc__(o); + if (PyErr_Occurred()) PyErr_WriteUnraisable(o); + --o->ob_refcnt; + PyErr_Restore(etype, eval, etb); + } + (*o->ob_type->tp_free)(o); +} + +static int __pyx_tp_traverse_6Recode_Outer(PyObject *o, visitproc v, void *a) { + return 0; +} + +static int __pyx_tp_clear_6Recode_Outer(PyObject *o) { + return 0; +} + +static struct PyMethodDef __pyx_methods_6Recode_Outer[] = { + {"all_charsets", (PyCFunction)__pyx_f_6Recode_5Outer_all_charsets, METH_VARARGS|METH_KEYWORDS, 0}, + {"all_surfaces", (PyCFunction)__pyx_f_6Recode_5Outer_all_surfaces, METH_VARARGS|METH_KEYWORDS, 0}, + {"concise_charset", (PyCFunction)__pyx_f_6Recode_5Outer_concise_charset, METH_VARARGS|METH_KEYWORDS, 0}, + {"full_charset", (PyCFunction)__pyx_f_6Recode_5Outer_full_charset, METH_VARARGS|METH_KEYWORDS, 0}, + {"set_libiconv", (PyCFunction)__pyx_f_6Recode_5Outer_set_libiconv, METH_VARARGS|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; + +static PyNumberMethods __pyx_tp_as_number_Outer = { + 0, /*nb_add*/ + 0, /*nb_subtract*/ + 0, /*nb_multiply*/ + 0, /*nb_divide*/ + 0, /*nb_remainder*/ + 0, /*nb_divmod*/ + 0, /*nb_power*/ + 0, /*nb_negative*/ + 0, /*nb_positive*/ + 0, /*nb_absolute*/ + 0, /*nb_nonzero*/ + 0, /*nb_invert*/ + 0, /*nb_lshift*/ + 0, /*nb_rshift*/ + 0, /*nb_and*/ + 0, /*nb_xor*/ + 0, /*nb_or*/ + 0, /*nb_coerce*/ + 0, /*nb_int*/ + 0, /*nb_long*/ + 0, /*nb_float*/ + 0, /*nb_oct*/ + 0, /*nb_hex*/ + 0, /*nb_inplace_add*/ + 0, /*nb_inplace_subtract*/ + 0, /*nb_inplace_multiply*/ + 0, /*nb_inplace_divide*/ + 0, /*nb_inplace_remainder*/ + 0, /*nb_inplace_power*/ + 0, /*nb_inplace_lshift*/ + 0, /*nb_inplace_rshift*/ + 0, /*nb_inplace_and*/ + 0, /*nb_inplace_xor*/ + 0, /*nb_inplace_or*/ + 0, /*nb_floor_divide*/ + 0, /*nb_true_divide*/ + 0, /*nb_inplace_floor_divide*/ + 0, /*nb_inplace_true_divide*/ + #if Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_INDEX + 0, /*nb_index*/ + #endif +}; + +static PySequenceMethods __pyx_tp_as_sequence_Outer = { + 0, /*sq_length*/ + 0, /*sq_concat*/ + 0, /*sq_repeat*/ + 0, /*sq_item*/ + 0, /*sq_slice*/ + 0, /*sq_ass_item*/ + 0, /*sq_ass_slice*/ + 0, /*sq_contains*/ + 0, /*sq_inplace_concat*/ + 0, /*sq_inplace_repeat*/ +}; + +static PyMappingMethods __pyx_tp_as_mapping_Outer = { + 0, /*mp_length*/ + 0, /*mp_subscript*/ + 0, /*mp_ass_subscript*/ +}; + +static PyBufferProcs __pyx_tp_as_buffer_Outer = { + 0, /*bf_getreadbuffer*/ + 0, /*bf_getwritebuffer*/ + 0, /*bf_getsegcount*/ + 0, /*bf_getcharbuffer*/ +}; + +PyTypeObject __pyx_type_6Recode_Outer = { + PyObject_HEAD_INIT(0) + 0, /*ob_size*/ + "Recode.Outer", /*tp_name*/ + sizeof(struct __pyx_obj_6Recode_Outer), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_6Recode_Outer, /*tp_dealloc*/ + 0, /*tp_print*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_compare*/ + 0, /*tp_repr*/ + &__pyx_tp_as_number_Outer, /*tp_as_number*/ + &__pyx_tp_as_sequence_Outer, /*tp_as_sequence*/ + &__pyx_tp_as_mapping_Outer, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + &__pyx_tp_as_buffer_Outer, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + 0, /*tp_doc*/ + __pyx_tp_traverse_6Recode_Outer, /*tp_traverse*/ + __pyx_tp_clear_6Recode_Outer, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_6Recode_Outer, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + 0, /*tp_dictoffset*/ + __pyx_f_6Recode_5Outer___init__, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_6Recode_Outer, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ +}; + +static PyObject *__pyx_tp_new_6Recode_Request(PyTypeObject *t, PyObject *a, PyObject *k) { + PyObject *o = (*t->tp_alloc)(t, 0); + if (!o) return 0; + return o; +} + +static void __pyx_tp_dealloc_6Recode_Request(PyObject *o) { + { + PyObject *etype, *eval, *etb; + PyErr_Fetch(&etype, &eval, &etb); + ++o->ob_refcnt; + __pyx_f_6Recode_7Request___dealloc__(o); + if (PyErr_Occurred()) PyErr_WriteUnraisable(o); + --o->ob_refcnt; + PyErr_Restore(etype, eval, etb); + } + (*o->ob_type->tp_free)(o); +} + +static int __pyx_tp_traverse_6Recode_Request(PyObject *o, visitproc v, void *a) { + return 0; +} + +static int __pyx_tp_clear_6Recode_Request(PyObject *o) { + return 0; +} + +static struct PyMethodDef __pyx_methods_6Recode_Request[] = { + {"set_verbose", (PyCFunction)__pyx_f_6Recode_7Request_set_verbose, METH_VARARGS|METH_KEYWORDS, 0}, + {"scan", (PyCFunction)__pyx_f_6Recode_7Request_scan, METH_VARARGS|METH_KEYWORDS, 0}, + {"pair_sequence", (PyCFunction)__pyx_f_6Recode_7Request_pair_sequence, METH_VARARGS|METH_KEYWORDS, 0}, + {"format_table", (PyCFunction)__pyx_f_6Recode_7Request_format_table, METH_VARARGS|METH_KEYWORDS, 0}, + {"string", (PyCFunction)__pyx_f_6Recode_7Request_string, METH_VARARGS|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; + +static PyNumberMethods __pyx_tp_as_number_Request = { + 0, /*nb_add*/ + 0, /*nb_subtract*/ + 0, /*nb_multiply*/ + 0, /*nb_divide*/ + 0, /*nb_remainder*/ + 0, /*nb_divmod*/ + 0, /*nb_power*/ + 0, /*nb_negative*/ + 0, /*nb_positive*/ + 0, /*nb_absolute*/ + 0, /*nb_nonzero*/ + 0, /*nb_invert*/ + 0, /*nb_lshift*/ + 0, /*nb_rshift*/ + 0, /*nb_and*/ + 0, /*nb_xor*/ + 0, /*nb_or*/ + 0, /*nb_coerce*/ + 0, /*nb_int*/ + 0, /*nb_long*/ + 0, /*nb_float*/ + 0, /*nb_oct*/ + 0, /*nb_hex*/ + 0, /*nb_inplace_add*/ + 0, /*nb_inplace_subtract*/ + 0, /*nb_inplace_multiply*/ + 0, /*nb_inplace_divide*/ + 0, /*nb_inplace_remainder*/ + 0, /*nb_inplace_power*/ + 0, /*nb_inplace_lshift*/ + 0, /*nb_inplace_rshift*/ + 0, /*nb_inplace_and*/ + 0, /*nb_inplace_xor*/ + 0, /*nb_inplace_or*/ + 0, /*nb_floor_divide*/ + 0, /*nb_true_divide*/ + 0, /*nb_inplace_floor_divide*/ + 0, /*nb_inplace_true_divide*/ + #if Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_INDEX + 0, /*nb_index*/ + #endif +}; + +static PySequenceMethods __pyx_tp_as_sequence_Request = { + 0, /*sq_length*/ + 0, /*sq_concat*/ + 0, /*sq_repeat*/ + 0, /*sq_item*/ + 0, /*sq_slice*/ + 0, /*sq_ass_item*/ + 0, /*sq_ass_slice*/ + 0, /*sq_contains*/ + 0, /*sq_inplace_concat*/ + 0, /*sq_inplace_repeat*/ +}; + +static PyMappingMethods __pyx_tp_as_mapping_Request = { + 0, /*mp_length*/ + 0, /*mp_subscript*/ + 0, /*mp_ass_subscript*/ +}; + +static PyBufferProcs __pyx_tp_as_buffer_Request = { + 0, /*bf_getreadbuffer*/ + 0, /*bf_getwritebuffer*/ + 0, /*bf_getsegcount*/ + 0, /*bf_getcharbuffer*/ +}; + +PyTypeObject __pyx_type_6Recode_Request = { + PyObject_HEAD_INIT(0) + 0, /*ob_size*/ + "Recode.Request", /*tp_name*/ + sizeof(struct __pyx_obj_6Recode_Request), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_6Recode_Request, /*tp_dealloc*/ + 0, /*tp_print*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_compare*/ + 0, /*tp_repr*/ + &__pyx_tp_as_number_Request, /*tp_as_number*/ + &__pyx_tp_as_sequence_Request, /*tp_as_sequence*/ + &__pyx_tp_as_mapping_Request, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + &__pyx_tp_as_buffer_Request, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + 0, /*tp_doc*/ + __pyx_tp_traverse_6Recode_Request, /*tp_traverse*/ + __pyx_tp_clear_6Recode_Request, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_6Recode_Request, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + 0, /*tp_dictoffset*/ + __pyx_f_6Recode_7Request___init__, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_6Recode_Request, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ +}; + +static struct PyMethodDef __pyx_methods[] = { + {"recode", (PyCFunction)__pyx_f_6Recode_recode, METH_VARARGS|METH_KEYWORDS, 0}, + {0, 0, 0, 0} +}; + +static void __pyx_init_filenames(void); /*proto*/ + +PyMODINIT_FUNC initRecode(void); /*proto*/ +PyMODINIT_FUNC initRecode(void) { + PyObject *__pyx_1 = 0; + PyObject *__pyx_2 = 0; + PyObject *__pyx_3 = 0; + __pyx_init_filenames(); + __pyx_m = Py_InitModule4("Recode", __pyx_methods, 0, 0, PYTHON_API_VERSION); + if (!__pyx_m) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3; goto __pyx_L1;}; + Py_INCREF(__pyx_m); + __pyx_b = PyImport_AddModule("__builtin__"); + if (!__pyx_b) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3; goto __pyx_L1;}; + if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3; goto __pyx_L1;}; + if (__Pyx_InternStrings(__pyx_intern_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3; goto __pyx_L1;}; + if (PyType_Ready(&__pyx_type_6Recode_Outer) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 559; goto __pyx_L1;} + if (PyObject_SetAttrString(__pyx_m, "Outer", (PyObject *)&__pyx_type_6Recode_Outer) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 559; goto __pyx_L1;} + __pyx_ptype_6Recode_Outer = &__pyx_type_6Recode_Outer; + if (PyType_Ready(&__pyx_type_6Recode_Request) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 608; goto __pyx_L1;} + if (PyObject_SetAttrString(__pyx_m, "Request", (PyObject *)&__pyx_type_6Recode_Request) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 608; goto __pyx_L1;} + __pyx_ptype_6Recode_Request = &__pyx_type_6Recode_Request; + + /* "/bpi/phenix/home/pinard/entretien/recode/tests/Recode.pyx":481 */ + __pyx_1 = PyDict_New(); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 481; goto __pyx_L1;} + __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_Exception); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 481; goto __pyx_L1;} + __pyx_3 = PyTuple_New(1); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 481; goto __pyx_L1;} + PyTuple_SET_ITEM(__pyx_3, 0, __pyx_2); + __pyx_2 = 0; + __pyx_2 = __Pyx_CreateClass(__pyx_3, __pyx_1, __pyx_n_error, "Recode"); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 481; goto __pyx_L1;} + Py_DECREF(__pyx_3); __pyx_3 = 0; + if (PyObject_SetAttr(__pyx_m, __pyx_n_error, __pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 481; goto __pyx_L1;} + Py_DECREF(__pyx_2); __pyx_2 = 0; + Py_DECREF(__pyx_1); __pyx_1 = 0; + + /* "/bpi/phenix/home/pinard/entretien/recode/tests/Recode.pyx":486 */ + __pyx_3 = PyInt_FromLong(RECODE_NO_SYMBOL_TYPE); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 486; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_NO_SYMBOL_TYPE, __pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 486; goto __pyx_L1;} + Py_DECREF(__pyx_3); __pyx_3 = 0; + + /* "/bpi/phenix/home/pinard/entretien/recode/tests/Recode.pyx":487 */ + __pyx_2 = PyInt_FromLong(RECODE_CHARSET); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 487; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_CHARSET, __pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 487; goto __pyx_L1;} + Py_DECREF(__pyx_2); __pyx_2 = 0; + + /* "/bpi/phenix/home/pinard/entretien/recode/tests/Recode.pyx":488 */ + __pyx_1 = PyInt_FromLong(RECODE_DATA_SURFACE); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_DATA_SURFACE, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; goto __pyx_L1;} + Py_DECREF(__pyx_1); __pyx_1 = 0; + + /* "/bpi/phenix/home/pinard/entretien/recode/tests/Recode.pyx":489 */ + __pyx_3 = PyInt_FromLong(RECODE_TREE_SURFACE); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 489; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_TREE_SURFACE, __pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 489; goto __pyx_L1;} + Py_DECREF(__pyx_3); __pyx_3 = 0; + + /* "/bpi/phenix/home/pinard/entretien/recode/tests/Recode.pyx":491 */ + __pyx_2 = PyInt_FromLong(RECODE_NO_CHARSET_DATA); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 491; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_NO_CHARSET_DATA, __pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 491; goto __pyx_L1;} + Py_DECREF(__pyx_2); __pyx_2 = 0; + + /* "/bpi/phenix/home/pinard/entretien/recode/tests/Recode.pyx":492 */ + __pyx_1 = PyInt_FromLong(RECODE_STRIP_DATA); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_STRIP_DATA, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; goto __pyx_L1;} + Py_DECREF(__pyx_1); __pyx_1 = 0; + + /* "/bpi/phenix/home/pinard/entretien/recode/tests/Recode.pyx":493 */ + __pyx_3 = PyInt_FromLong(RECODE_EXPLODE_DATA); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 493; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_EXPLODE_DATA, __pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 493; goto __pyx_L1;} + Py_DECREF(__pyx_3); __pyx_3 = 0; + + /* "/bpi/phenix/home/pinard/entretien/recode/tests/Recode.pyx":495 */ + __pyx_2 = PyInt_FromLong(RECODE_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_SIZE_1, __pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; goto __pyx_L1;} + Py_DECREF(__pyx_2); __pyx_2 = 0; + + /* "/bpi/phenix/home/pinard/entretien/recode/tests/Recode.pyx":496 */ + __pyx_1 = PyInt_FromLong(RECODE_2); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_SIZE_2, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; goto __pyx_L1;} + Py_DECREF(__pyx_1); __pyx_1 = 0; + + /* "/bpi/phenix/home/pinard/entretien/recode/tests/Recode.pyx":497 */ + __pyx_3 = PyInt_FromLong(RECODE_4); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 497; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_SIZE_4, __pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 497; goto __pyx_L1;} + Py_DECREF(__pyx_3); __pyx_3 = 0; + + /* "/bpi/phenix/home/pinard/entretien/recode/tests/Recode.pyx":498 */ + __pyx_2 = PyInt_FromLong(RECODE_N); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_SIZE_N, __pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; goto __pyx_L1;} + Py_DECREF(__pyx_2); __pyx_2 = 0; + + /* "/bpi/phenix/home/pinard/entretien/recode/tests/Recode.pyx":500 */ + __pyx_1 = PyInt_FromLong(RECODE_NO_STEP_TABLE); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 500; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_NO_STEP_TABLE, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 500; goto __pyx_L1;} + Py_DECREF(__pyx_1); __pyx_1 = 0; + + /* "/bpi/phenix/home/pinard/entretien/recode/tests/Recode.pyx":501 */ + __pyx_3 = PyInt_FromLong(RECODE_BYTE_TO_BYTE); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 501; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_BYTE_TO_BYTE, __pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 501; goto __pyx_L1;} + Py_DECREF(__pyx_3); __pyx_3 = 0; + + /* "/bpi/phenix/home/pinard/entretien/recode/tests/Recode.pyx":502 */ + __pyx_2 = PyInt_FromLong(RECODE_BYTE_TO_STRING); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 502; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_BYTE_TO_STRING, __pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 502; goto __pyx_L1;} + Py_DECREF(__pyx_2); __pyx_2 = 0; + + /* "/bpi/phenix/home/pinard/entretien/recode/tests/Recode.pyx":503 */ + __pyx_1 = PyInt_FromLong(RECODE_UCS2_TO_BYTE); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_UCS2_TO_BYTE, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; goto __pyx_L1;} + Py_DECREF(__pyx_1); __pyx_1 = 0; + + /* "/bpi/phenix/home/pinard/entretien/recode/tests/Recode.pyx":504 */ + __pyx_3 = PyInt_FromLong(RECODE_UCS2_TO_STRING); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 504; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_UCS2_TO_STRING, __pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 504; goto __pyx_L1;} + Py_DECREF(__pyx_3); __pyx_3 = 0; + + /* "/bpi/phenix/home/pinard/entretien/recode/tests/Recode.pyx":505 */ + __pyx_2 = PyInt_FromLong(RECODE_STRING_TO_UCS2); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 505; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_STRING_TO_UCS2, __pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 505; goto __pyx_L1;} + Py_DECREF(__pyx_2); __pyx_2 = 0; + + /* "/bpi/phenix/home/pinard/entretien/recode/tests/Recode.pyx":506 */ + __pyx_1 = PyInt_FromLong(RECODE_COMBINE_EXPLODE); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 506; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_COMBINE_EXPLODE, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 506; goto __pyx_L1;} + Py_DECREF(__pyx_1); __pyx_1 = 0; + + /* "/bpi/phenix/home/pinard/entretien/recode/tests/Recode.pyx":507 */ + __pyx_3 = PyInt_FromLong(RECODE_COMBINE_STEP); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_COMBINE_STEP, __pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; goto __pyx_L1;} + Py_DECREF(__pyx_3); __pyx_3 = 0; + + /* "/bpi/phenix/home/pinard/entretien/recode/tests/Recode.pyx":508 */ + __pyx_2 = PyInt_FromLong(RECODE_EXPLODE_STEP); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 508; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_EXPLODE_STEP, __pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 508; goto __pyx_L1;} + Py_DECREF(__pyx_2); __pyx_2 = 0; + + /* "/bpi/phenix/home/pinard/entretien/recode/tests/Recode.pyx":510 */ + __pyx_1 = PyInt_FromLong(RECODE_STRATEGY_UNDECIDED); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 510; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_STRATEGY_UNDECIDED, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 510; goto __pyx_L1;} + Py_DECREF(__pyx_1); __pyx_1 = 0; + + /* "/bpi/phenix/home/pinard/entretien/recode/tests/Recode.pyx":511 */ + __pyx_3 = PyInt_FromLong(RECODE_SEQUENCE_IN_MEMORY); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 511; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_SEQUENCE_IN_MEMORY, __pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 511; goto __pyx_L1;} + Py_DECREF(__pyx_3); __pyx_3 = 0; + + /* "/bpi/phenix/home/pinard/entretien/recode/tests/Recode.pyx":512 */ + __pyx_2 = PyInt_FromLong(RECODE_SEQUENCE_WITH_FILES); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_SEQUENCE_WITH_FILES, __pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; goto __pyx_L1;} + Py_DECREF(__pyx_2); __pyx_2 = 0; + + /* "/bpi/phenix/home/pinard/entretien/recode/tests/Recode.pyx":513 */ + __pyx_1 = PyInt_FromLong(RECODE_SEQUENCE_WITH_PIPE); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_SEQUENCE_WITH_PIPE, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; goto __pyx_L1;} + Py_DECREF(__pyx_1); __pyx_1 = 0; + + /* "/bpi/phenix/home/pinard/entretien/recode/tests/Recode.pyx":515 */ + __pyx_3 = PyInt_FromLong(RECODE_SWAP_UNDECIDED); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 515; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_SWAP_UNDECIDED, __pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 515; goto __pyx_L1;} + Py_DECREF(__pyx_3); __pyx_3 = 0; + + /* "/bpi/phenix/home/pinard/entretien/recode/tests/Recode.pyx":516 */ + __pyx_2 = PyInt_FromLong(RECODE_SWAP_NO); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 516; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_SWAP_NO, __pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 516; goto __pyx_L1;} + Py_DECREF(__pyx_2); __pyx_2 = 0; + + /* "/bpi/phenix/home/pinard/entretien/recode/tests/Recode.pyx":517 */ + __pyx_1 = PyInt_FromLong(RECODE_SWAP_YES); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 517; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_SWAP_YES, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 517; goto __pyx_L1;} + Py_DECREF(__pyx_1); __pyx_1 = 0; + + /* "/bpi/phenix/home/pinard/entretien/recode/tests/Recode.pyx":519 */ + __pyx_3 = PyInt_FromLong(RECODE_NO_ERROR); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 519; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_NO_ERROR, __pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 519; goto __pyx_L1;} + Py_DECREF(__pyx_3); __pyx_3 = 0; + + /* "/bpi/phenix/home/pinard/entretien/recode/tests/Recode.pyx":520 */ + __pyx_2 = PyInt_FromLong(RECODE_NOT_CANONICAL); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 520; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_NOT_CANONICAL, __pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 520; goto __pyx_L1;} + Py_DECREF(__pyx_2); __pyx_2 = 0; + + /* "/bpi/phenix/home/pinard/entretien/recode/tests/Recode.pyx":521 */ + __pyx_1 = PyInt_FromLong(RECODE_AMBIGUOUS_OUTPUT); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 521; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_AMBIGUOUS_OUTPUT, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 521; goto __pyx_L1;} + Py_DECREF(__pyx_1); __pyx_1 = 0; + + /* "/bpi/phenix/home/pinard/entretien/recode/tests/Recode.pyx":522 */ + __pyx_3 = PyInt_FromLong(RECODE_UNTRANSLATABLE); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_UNTRANSLATABLE, __pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; goto __pyx_L1;} + Py_DECREF(__pyx_3); __pyx_3 = 0; + + /* "/bpi/phenix/home/pinard/entretien/recode/tests/Recode.pyx":523 */ + __pyx_2 = PyInt_FromLong(RECODE_INVALID_INPUT); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 523; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_INVALID_INPUT, __pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 523; goto __pyx_L1;} + Py_DECREF(__pyx_2); __pyx_2 = 0; + + /* "/bpi/phenix/home/pinard/entretien/recode/tests/Recode.pyx":524 */ + __pyx_1 = PyInt_FromLong(RECODE_SYSTEM_ERROR); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 524; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_SYSTEM_ERROR, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 524; goto __pyx_L1;} + Py_DECREF(__pyx_1); __pyx_1 = 0; + + /* "/bpi/phenix/home/pinard/entretien/recode/tests/Recode.pyx":525 */ + __pyx_3 = PyInt_FromLong(RECODE_USER_ERROR); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 525; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_USER_ERROR, __pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 525; goto __pyx_L1;} + Py_DECREF(__pyx_3); __pyx_3 = 0; + + /* "/bpi/phenix/home/pinard/entretien/recode/tests/Recode.pyx":526 */ + __pyx_2 = PyInt_FromLong(RECODE_INTERNAL_ERROR); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 526; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_INTERNAL_ERROR, __pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 526; goto __pyx_L1;} + Py_DECREF(__pyx_2); __pyx_2 = 0; + + /* "/bpi/phenix/home/pinard/entretien/recode/tests/Recode.pyx":527 */ + __pyx_1 = PyInt_FromLong(RECODE_MAXIMUM_ERROR); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 527; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_MAXIMUM_ERROR, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 527; goto __pyx_L1;} + Py_DECREF(__pyx_1); __pyx_1 = 0; + + /* "/bpi/phenix/home/pinard/entretien/recode/tests/Recode.pyx":529 */ + __pyx_3 = PyInt_FromLong(RECODE_NO_FORMAT); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_NO_FORMAT, __pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; goto __pyx_L1;} + Py_DECREF(__pyx_3); __pyx_3 = 0; + + /* "/bpi/phenix/home/pinard/entretien/recode/tests/Recode.pyx":530 */ + __pyx_2 = PyInt_FromLong(RECODE_DECIMAL_FORMAT); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_DECIMAL_FORMAT, __pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; goto __pyx_L1;} + Py_DECREF(__pyx_2); __pyx_2 = 0; + + /* "/bpi/phenix/home/pinard/entretien/recode/tests/Recode.pyx":531 */ + __pyx_1 = PyInt_FromLong(RECODE_OCTAL_FORMAT); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 531; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_OCTAL_FORMAT, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 531; goto __pyx_L1;} + Py_DECREF(__pyx_1); __pyx_1 = 0; + + /* "/bpi/phenix/home/pinard/entretien/recode/tests/Recode.pyx":532 */ + __pyx_3 = PyInt_FromLong(RECODE_HEXADECIMAL_FORMAT); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 532; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_HEXADECIMAL_FORMAT, __pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 532; goto __pyx_L1;} + Py_DECREF(__pyx_3); __pyx_3 = 0; + + /* "/bpi/phenix/home/pinard/entretien/recode/tests/Recode.pyx":533 */ + __pyx_2 = PyInt_FromLong(RECODE_FULL_FORMAT); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_FULL_FORMAT, __pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; goto __pyx_L1;} + Py_DECREF(__pyx_2); __pyx_2 = 0; + + /* "/bpi/phenix/home/pinard/entretien/recode/tests/Recode.pyx":535 */ + __pyx_1 = PyInt_FromLong(RECODE_NO_LANGUAGE); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_NO_LANGUAGE, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; goto __pyx_L1;} + Py_DECREF(__pyx_1); __pyx_1 = 0; + + /* "/bpi/phenix/home/pinard/entretien/recode/tests/Recode.pyx":536 */ + __pyx_3 = PyInt_FromLong(RECODE_LANGUAGE_C); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 536; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_LANGUAGE_C, __pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 536; goto __pyx_L1;} + Py_DECREF(__pyx_3); __pyx_3 = 0; + + /* "/bpi/phenix/home/pinard/entretien/recode/tests/Recode.pyx":537 */ + __pyx_2 = PyInt_FromLong(RECODE_LANGUAGE_PERL); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 537; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_LANGUAGE_PERL, __pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 537; goto __pyx_L1;} + Py_DECREF(__pyx_2); __pyx_2 = 0; + + /* "/bpi/phenix/home/pinard/entretien/recode/tests/Recode.pyx":539 */ + __pyx_1 = PyInt_FromLong(NUL); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 539; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_NUL, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 539; goto __pyx_L1;} + Py_DECREF(__pyx_1); __pyx_1 = 0; + + /* "/bpi/phenix/home/pinard/entretien/recode/tests/Recode.pyx":540 */ + __pyx_3 = PyInt_FromLong(STRIP_SIZE); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 540; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_STRIP_SIZE, __pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 540; goto __pyx_L1;} + Py_DECREF(__pyx_3); __pyx_3 = 0; + + /* "/bpi/phenix/home/pinard/entretien/recode/tests/Recode.pyx":542 */ + __pyx_2 = PyInt_FromLong(SYMBOL_CREATE_CHARSET); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 542; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_SYMBOL_CREATE_CHARSET, __pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 542; goto __pyx_L1;} + Py_DECREF(__pyx_2); __pyx_2 = 0; + + /* "/bpi/phenix/home/pinard/entretien/recode/tests/Recode.pyx":543 */ + __pyx_1 = PyInt_FromLong(SYMBOL_CREATE_DATA_SURFACE); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_SYMBOL_CREATE_DATA_SURFACE, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; goto __pyx_L1;} + Py_DECREF(__pyx_1); __pyx_1 = 0; + + /* "/bpi/phenix/home/pinard/entretien/recode/tests/Recode.pyx":544 */ + __pyx_3 = PyInt_FromLong(SYMBOL_CREATE_TREE_SURFACE); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_SYMBOL_CREATE_TREE_SURFACE, __pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; goto __pyx_L1;} + Py_DECREF(__pyx_3); __pyx_3 = 0; + + /* "/bpi/phenix/home/pinard/entretien/recode/tests/Recode.pyx":545 */ + __pyx_2 = PyInt_FromLong(ALIAS_FIND_AS_CHARSET); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 545; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_ALIAS_FIND_AS_CHARSET, __pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 545; goto __pyx_L1;} + Py_DECREF(__pyx_2); __pyx_2 = 0; + + /* "/bpi/phenix/home/pinard/entretien/recode/tests/Recode.pyx":546 */ + __pyx_1 = PyInt_FromLong(ALIAS_FIND_AS_SURFACE); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 546; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_ALIAS_FIND_AS_SURFACE, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 546; goto __pyx_L1;} + Py_DECREF(__pyx_1); __pyx_1 = 0; + + /* "/bpi/phenix/home/pinard/entretien/recode/tests/Recode.pyx":547 */ + __pyx_3 = PyInt_FromLong(ALIAS_FIND_AS_EITHER); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_ALIAS_FIND_AS_EITHER, __pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; goto __pyx_L1;} + Py_DECREF(__pyx_3); __pyx_3 = 0; + + /* "/bpi/phenix/home/pinard/entretien/recode/tests/Recode.pyx":549 */ + __pyx_2 = PyInt_FromLong(DONE); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 549; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_xDONE, __pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 549; goto __pyx_L1;} + Py_DECREF(__pyx_2); __pyx_2 = 0; + + /* "/bpi/phenix/home/pinard/entretien/recode/tests/Recode.pyx":550 */ + __pyx_1 = PyInt_FromLong(ELSE); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_xELSE, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; goto __pyx_L1;} + Py_DECREF(__pyx_1); __pyx_1 = 0; + + /* "/bpi/phenix/home/pinard/entretien/recode/tests/Recode.pyx":552 */ + __pyx_3 = PyInt_FromLong(REPLACEMENT_CHARACTER); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 552; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_REPLACEMENT_CHARACTER, __pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 552; goto __pyx_L1;} + Py_DECREF(__pyx_3); __pyx_3 = 0; + + /* "/bpi/phenix/home/pinard/entretien/recode/tests/Recode.pyx":553 */ + __pyx_2 = PyInt_FromLong(NOT_A_CHARACTER); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_NOT_A_CHARACTER, __pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; goto __pyx_L1;} + Py_DECREF(__pyx_2); __pyx_2 = 0; + + /* "/bpi/phenix/home/pinard/entretien/recode/tests/Recode.pyx":554 */ + __pyx_1 = PyInt_FromLong(BYTE_ORDER_MARK); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 554; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_BYTE_ORDER_MARK, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 554; goto __pyx_L1;} + Py_DECREF(__pyx_1); __pyx_1 = 0; + + /* "/bpi/phenix/home/pinard/entretien/recode/tests/Recode.pyx":555 */ + __pyx_3 = PyInt_FromLong(BYTE_ORDER_MARK_SWAPPED); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 555; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_BYTE_ORDER_MARK_SWAPPED, __pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 555; goto __pyx_L1;} + Py_DECREF(__pyx_3); __pyx_3 = 0; + + /* "/bpi/phenix/home/pinard/entretien/recode/tests/Recode.pyx":562 */ + __pyx_2 = __Pyx_GetName(__pyx_b, __pyx_n_False); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 562; goto __pyx_L1;} + __pyx_k2 = __pyx_2; + __pyx_2 = 0; + + /* "/bpi/phenix/home/pinard/entretien/recode/tests/Recode.pyx":591 */ + __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_n_NO_FORMAT); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 591; goto __pyx_L1;} + __pyx_k3 = __pyx_1; + __pyx_1 = 0; + + /* "/bpi/phenix/home/pinard/entretien/recode/tests/Recode.pyx":669 */ + __pyx_3 = PyObject_CallObject(((PyObject*)__pyx_ptype_6Recode_Outer), 0); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 669; goto __pyx_L1;} + if (PyObject_SetAttr(__pyx_m, __pyx_n_global_outer, __pyx_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 669; goto __pyx_L1;} + Py_DECREF(__pyx_3); __pyx_3 = 0; + + /* "/bpi/phenix/home/pinard/entretien/recode/tests/Recode.pyx":671 */ + return; + __pyx_L1:; + Py_XDECREF(__pyx_1); + Py_XDECREF(__pyx_2); + Py_XDECREF(__pyx_3); + __Pyx_AddTraceback("Recode"); +} + +static char *__pyx_filenames[] = { + "Recode.pyx", +}; + +/* Runtime support code */ + +static void __pyx_init_filenames(void) { + __pyx_f = __pyx_filenames; +} + +static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, char *name) { + if (!type) { + PyErr_Format(PyExc_SystemError, "Missing type object"); + return 0; + } + if ((none_allowed && obj == Py_None) || PyObject_TypeCheck(obj, type)) + return 1; + PyErr_Format(PyExc_TypeError, + "Argument '%s' has incorrect type (expected %s, got %s)", + name, type->tp_name, obj->ob_type->tp_name); + return 0; +} + +static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name) { + PyObject *result; + result = PyObject_GetAttr(dict, name); + if (!result) + PyErr_SetObject(PyExc_NameError, name); + return result; +} + +static PyObject *__Pyx_CreateClass( + PyObject *bases, PyObject *dict, PyObject *name, char *modname) +{ + PyObject *py_modname; + PyObject *result = 0; + + py_modname = PyString_FromString(modname); + if (!py_modname) + goto bad; + if (PyDict_SetItemString(dict, "__module__", py_modname) < 0) + goto bad; + result = PyClass_New(bases, dict, name); +bad: + Py_XDECREF(py_modname); + return result; +} + +static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb) { + Py_XINCREF(type); + Py_XINCREF(value); + Py_XINCREF(tb); + /* First, check the traceback argument, replacing None with NULL. */ + if (tb == Py_None) { + Py_DECREF(tb); + tb = 0; + } + else if (tb != NULL && !PyTraceBack_Check(tb)) { + PyErr_SetString(PyExc_TypeError, + "raise: arg 3 must be a traceback or None"); + goto raise_error; + } + /* Next, replace a missing value with None */ + if (value == NULL) { + value = Py_None; + Py_INCREF(value); + } + #if PY_VERSION_HEX < 0x02050000 + if (!PyClass_Check(type)) + #else + if (!PyType_Check(type)) + #endif + { + /* Raising an instance. The value should be a dummy. */ + if (value != Py_None) { + PyErr_SetString(PyExc_TypeError, + "instance exception may not have a separate value"); + goto raise_error; + } + /* Normalize to raise , */ + Py_DECREF(value); + value = type; + #if PY_VERSION_HEX < 0x02050000 + if (PyInstance_Check(type)) { + type = (PyObject*) ((PyInstanceObject*)type)->in_class; + Py_INCREF(type); + } + else { + PyErr_SetString(PyExc_TypeError, + "raise: exception must be an old-style class or instance"); + goto raise_error; + } + #else + type = (PyObject*) type->ob_type; + Py_INCREF(type); + if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) { + PyErr_SetString(PyExc_TypeError, + "raise: exception class must be a subclass of BaseException"); + goto raise_error; + } + #endif + } + PyErr_Restore(type, value, tb); + return; +raise_error: + Py_XDECREF(value); + Py_XDECREF(type); + Py_XDECREF(tb); + return; +} + +static int __Pyx_InternStrings(__Pyx_InternTabEntry *t) { + while (t->p) { + *t->p = PyString_InternFromString(t->s); + if (!*t->p) + return -1; + ++t; + } + return 0; +} + +#include "compile.h" +#include "frameobject.h" +#include "traceback.h" + +static void __Pyx_AddTraceback(char *funcname) { + PyObject *py_srcfile = 0; + PyObject *py_funcname = 0; + PyObject *py_globals = 0; + PyObject *empty_tuple = 0; + PyObject *empty_string = 0; + PyCodeObject *py_code = 0; + PyFrameObject *py_frame = 0; + + py_srcfile = PyString_FromString(__pyx_filename); + if (!py_srcfile) goto bad; + py_funcname = PyString_FromString(funcname); + if (!py_funcname) goto bad; + py_globals = PyModule_GetDict(__pyx_m); + if (!py_globals) goto bad; + empty_tuple = PyTuple_New(0); + if (!empty_tuple) goto bad; + empty_string = PyString_FromString(""); + if (!empty_string) goto bad; + py_code = PyCode_New( + 0, /*int argcount,*/ + 0, /*int nlocals,*/ + 0, /*int stacksize,*/ + 0, /*int flags,*/ + empty_string, /*PyObject *code,*/ + empty_tuple, /*PyObject *consts,*/ + empty_tuple, /*PyObject *names,*/ + empty_tuple, /*PyObject *varnames,*/ + empty_tuple, /*PyObject *freevars,*/ + empty_tuple, /*PyObject *cellvars,*/ + py_srcfile, /*PyObject *filename,*/ + py_funcname, /*PyObject *name,*/ + __pyx_lineno, /*int firstlineno,*/ + empty_string /*PyObject *lnotab*/ + ); + if (!py_code) goto bad; + py_frame = PyFrame_New( + PyThreadState_Get(), /*PyThreadState *tstate,*/ + py_code, /*PyCodeObject *code,*/ + py_globals, /*PyObject *globals,*/ + 0 /*PyObject *locals*/ + ); + if (!py_frame) goto bad; + py_frame->f_lineno = __pyx_lineno; + PyTraceBack_Here(py_frame); +bad: + Py_XDECREF(py_srcfile); + Py_XDECREF(py_funcname); + Py_XDECREF(empty_tuple); + Py_XDECREF(empty_string); + Py_XDECREF(py_code); + Py_XDECREF(py_frame); +} diff --git a/python/Recode.pyx b/tests/Recode.pyx similarity index 100% rename from python/Recode.pyx rename to tests/Recode.pyx